Documentation
¶
Index ¶
- Variables
- func StringToPointer(s string) *string
- type AcceptOptionsQuoteResponse
- type AcceptOptionsQuoteService
- type Account
- type AccountOptionsInfo
- type AccountResponse
- type Airdrop
- type AirdropsResponse
- type AllBalance
- type AllBalancesResponse
- type Balance
- type BalancesResponse
- type Basket
- type BorrowHistory
- type BorrowRate
- type CancelAllOrderParams
- type CancelAllOrderResponse
- type CancelAllOrderService
- type CancelOrderByClientIDResponse
- type CancelOrderByClientIDService
- type CancelOrderResponse
- type CancelOrderService
- type CancelQuoteRequest
- type CancelQuoteRequestResponse
- type CancelQuoteRequestService
- type CancelQuoteResponse
- type CancelQuoteService
- type CancelTriggerOrderResponse
- type CancelTriggerOrderService
- type ChangeAccountLeverageResponse
- type ChangeAccountLeverageService
- type ChangeSubAccountNameParams
- type ChangeSubAccountNameResponse
- type ChangeSubAccountNameService
- type Client
- func (c *Client) NewAcceptOptionsQuoteService() *AcceptOptionsQuoteService
- func (c *Client) NewCancelAllOrderService() *CancelAllOrderService
- func (c *Client) NewCancelOrderByClientIDService() *CancelOrderByClientIDService
- func (c *Client) NewCancelOrderService() *CancelOrderService
- func (c *Client) NewCancelQuoteRequestService() *CancelQuoteRequestService
- func (c *Client) NewCancelQuoteService() *CancelQuoteService
- func (c *Client) NewCancelTriggerOrderService() *CancelTriggerOrderService
- func (c *Client) NewChangeAccountLeverageService() *ChangeAccountLeverageService
- func (c *Client) NewChangeSubAccountNameService() *ChangeSubAccountNameService
- func (c *Client) NewCreateQuoteRequestService() *CreateQuoteRequestService
- func (c *Client) NewCreateQuoteService() *CreateQuoteService
- func (c *Client) NewCreateSaveAddressesService() *CreateSaveAddressesService
- func (c *Client) NewCreateSubAccountService() *CreateSubAccountService
- func (c *Client) NewDeleteSaveAddressesService() *DeleteSaveAddressesService
- func (c *Client) NewDeleteSubAccountService() *DeleteSubAccountService
- func (c *Client) NewFundingPaymentsService() *FundingPaymentsService
- func (c *Client) NewGet24HOptionVolumeService() *Get24HOptionVolumeService
- func (c *Client) NewGetAccountOptionsInfoService() *GetAccountOptionsInfoService
- func (c *Client) NewGetAccountService() *GetAccountService
- func (c *Client) NewGetAirdropsService() *GetAirdropsService
- func (c *Client) NewGetAllBalancesService() *GetAllBalancesService
- func (c *Client) NewGetAllSubAccountsService() *GetAllSubAccountsService
- func (c *Client) NewGetBalancesService() *GetBalancesService
- func (c *Client) NewGetBorrowRatesService() *GetBorrowRatesService
- func (c *Client) NewGetCoinsService() *GetCoinsService
- func (c *Client) NewGetDailyBorrowedAmountsService() *GetDailyBorrowedAmountsService
- func (c *Client) NewGetDepositAddressListService() *GetDepositAddressListService
- func (c *Client) NewGetDepositAddressService() *GetDepositAddressService
- func (c *Client) NewGetDepositHistoryService() *GetDepositHistoryService
- func (c *Client) NewGetExpiredFuturesService() *GetExpiredFuturesService
- func (c *Client) NewGetFutureFundingRateService() *GetFutureFundingRateService
- func (c *Client) NewGetFutureIndexWeightsService() *GetFutureIndexWeightsService
- func (c *Client) NewGetFutureService() *GetFutureService
- func (c *Client) NewGetFutureStatsService() *GetFutureStatsService
- func (c *Client) NewGetHistorical24HOptionVolumeService() *GetHistorical24HOptionVolumeService
- func (c *Client) NewGetHistoricalIndexService() *GetHistoricalIndexService
- func (c *Client) NewGetHistoricalOpenInterestService() *GetHistoricalOpenInterestService
- func (c *Client) NewGetHistoricalPricesService() *GetHistoricalPricesService
- func (c *Client) NewGetLendingHistoryService() *GetLendingHistoryService
- func (c *Client) NewGetLendingInfoService() *GetLendingInfoService
- func (c *Client) NewGetLendingOffersService() *GetLendingOffersService
- func (c *Client) NewGetLendingRatesService() *GetLendingRatesService
- func (c *Client) NewGetLeveragedTokenBalancesService() *GetLeveragedTokenBalancesService
- func (c *Client) NewGetLeveragedTokenInfoService() *GetLeveragedTokenInfoService
- func (c *Client) NewGetListFutureService() *GetListFutureService
- func (c *Client) NewGetMarketsService() *GetMarketsService
- func (c *Client) NewGetMyBorrowHistoryService() *GetMyBorrowHistoryService
- func (c *Client) NewGetMyLendingHistoryService() *GetMyLendingHistoryService
- func (c *Client) NewGetMyQuotesService() *GetMyQuotesService
- func (c *Client) NewGetOpenOrdersService() *GetOpenOrdersService
- func (c *Client) NewGetOpenTriggerOrdersService() *GetOpenTriggerOrdersService
- func (c *Client) NewGetOptionOpenInterestService() *GetOptionOpenInterestService
- func (c *Client) NewGetOrderBookService() *GetOrderBookService
- func (c *Client) NewGetOrderHistoryService() *GetOrderHistoryService
- func (c *Client) NewGetOrderStatusByClientIDService() *GetOrderStatusByClientIDService
- func (c *Client) NewGetOrderStatusService() *GetOrderStatusService
- func (c *Client) NewGetPositionsService() *GetPositionsService
- func (c *Client) NewGetPublicOptionsTradesService() *GetPublicOptionsTradesService
- func (c *Client) NewGetQuotesForYourQuoteRequestService() *GetQuotesForYourQuoteRequestService
- func (c *Client) NewGetSaveAddressesService() *GetSaveAddressesService
- func (c *Client) NewGetSingleMarketsService() *GetSingleMarketService
- func (c *Client) NewGetSpotMarginMarketInfoService() *GetSpotMarginMarketInfoService
- func (c *Client) NewGetTradesService() *GetTradesService
- func (c *Client) NewGetTriggerOrderHistoryService() *GetTriggerOrderHistoryService
- func (c *Client) NewGetWithdrawHistoryService() *GetWithdrawHistoryService
- func (c *Client) NewGetWithdrawalFeesService() *GetWithdrawalFeesService
- func (c *Client) NewListLeveragedTokenCreationRequestsService() *ListLeveragedTokenCreationRequestsService
- func (c *Client) NewListLeveragedTokenRedemptionRequestsService() *ListLeveragedTokenRedemptionRequestsService
- func (c *Client) NewListLeveragedTokensService() *ListLeveragedTokensService
- func (c *Client) NewListQuoteRequestsService() *ListQuoteRequestsService
- func (c *Client) NewModifyOrderByClientIDService() *ModifyOrderByClientIDService
- func (c *Client) NewModifyOrderService() *ModifyOrderService
- func (c *Client) NewModifyTriggerOrderService() *ModifyTriggerOrderService
- func (c *Client) NewPlaceOrderService() *PlaceOrderService
- func (c *Client) NewPlaceTriggerOrderService() *PlaceTriggerOrderService
- func (c *Client) NewRequestETFRebalanceInfoService() *RequestETFRebalanceInfoService
- func (c *Client) NewRequestLeveragedTokenCreationService() *RequestLeveragedTokenCreationService
- func (c *Client) NewRequestLeveragedTokenRedemptionService() *RequestLeveragedTokenRedemptionService
- func (c *Client) NewSubmitLendingOfferService() *SubmitLendingOfferService
- func (c *Client) NewTransferBetweenSubAccountsService() *TransferBetweenSubAccountsService
- func (c *Client) NewWithdrawService() *WithdrawService
- func (c *Client) NewYourQuoteRequestsService() *YourQuoteRequestsService
- func (c *Client) SubAccount(subaccount *string) *Client
- type Coin
- type CoinSpotMarginInfo
- type CoinsResponse
- type CreateAddressesResponse
- type CreateQuoteParams
- type CreateQuoteRequest
- type CreateQuoteRequestParams
- type CreateQuoteRequestResponse
- type CreateQuoteRequestService
- type CreateQuoteResponse
- type CreateQuoteService
- type CreateSaveAddressParams
- type CreateSaveAddressesService
- type CreateSubAccountParams
- type CreateSubAccountResponse
- type CreateSubAccountService
- type DailyBorrowedAmounts
- type DeleteAddressesResponse
- type DeleteSaveAddressesService
- type DeleteSubAccountParams
- type DeleteSubAccountResponse
- type DeleteSubAccountService
- type DepositAddress
- type DepositAddressList
- type DepositAddressResponse
- type DepositHistory
- type DepositHistoryResponse
- type ETFRebalanceInfo
- type ExpiredFuture
- type ExpiredFuturesResponse
- type Feed
- type Fill
- type FillResponse
- type FillsService
- func (s *FillsService) Do(ctx context.Context) ([]Fill, error)
- func (s *FillsService) EndTime(endTime int64) *FillsService
- func (s *FillsService) Market(market string) *FillsService
- func (s *FillsService) Order(order OrderBy) *FillsService
- func (s *FillsService) OrderID(orderID int64) *FillsService
- func (s *FillsService) StartTime(startTime int64) *FillsService
- type FundingPayment
- type FundingPaymentsResponse
- type FundingPaymentsService
- func (s *FundingPaymentsService) Do(ctx context.Context) ([]FundingPayment, error)
- func (s *FundingPaymentsService) EndTime(endTime int64) *FundingPaymentsService
- func (s *FundingPaymentsService) Future(future string) *FundingPaymentsService
- func (s *FundingPaymentsService) StartTime(startTime int64) *FundingPaymentsService
- type Future
- type FutureFundingRate
- type FutureFundingRateResponse
- type FutureIndexWeights
- type FutureIndexWeightsResponse
- type FutureResponse
- type FutureStats
- type FutureStatsResponse
- type Get24HOptionVolumeResponse
- type Get24HOptionVolumeService
- type GetAccountOptionsInfoResponse
- type GetAccountOptionsInfoService
- type GetAccountService
- type GetAirdropsService
- type GetAllBalancesService
- type GetAllSubAccountsResponse
- type GetAllSubAccountsService
- type GetBalancesService
- type GetBorrowRatesResponse
- type GetBorrowRatesService
- type GetCoinsService
- type GetDailyBorrowedAmountsResponse
- type GetDailyBorrowedAmountsService
- type GetDepositAddressListResponse
- type GetDepositAddressListService
- type GetDepositAddressService
- type GetDepositHistoryService
- type GetExpiredFuturesService
- type GetFutureFundingRateService
- func (s *GetFutureFundingRateService) Do(ctx context.Context) ([]FutureFundingRate, error)
- func (s *GetFutureFundingRateService) EndTime(endTime int64) *GetFutureFundingRateService
- func (s *GetFutureFundingRateService) Future(future string) *GetFutureFundingRateService
- func (s *GetFutureFundingRateService) StartTime(startTime int64) *GetFutureFundingRateService
- type GetFutureIndexWeightsService
- type GetFutureService
- type GetFutureStatsService
- type GetHistorical24HOptionVolumeService
- func (s *GetHistorical24HOptionVolumeService) Do(ctx context.Context) ([]Historical24HVolume, error)
- func (s *GetHistorical24HOptionVolumeService) EndTime(endTime int64) *GetHistorical24HOptionVolumeService
- func (s *GetHistorical24HOptionVolumeService) StartTime(startTime int64) *GetHistorical24HOptionVolumeService
- type GetHistoricalIndexService
- func (s *GetHistoricalIndexService) Do(ctx context.Context) ([]HistoricalIndex, error)
- func (s *GetHistoricalIndexService) EndTime(endTime int64) *GetHistoricalIndexService
- func (s *GetHistoricalIndexService) MarketName(marketName string) *GetHistoricalIndexService
- func (s *GetHistoricalIndexService) Resolution(resolution int64) *GetHistoricalIndexService
- func (s *GetHistoricalIndexService) StartTime(startTime int64) *GetHistoricalIndexService
- type GetHistoricalOpenInterestResponse
- type GetHistoricalOpenInterestService
- func (s *GetHistoricalOpenInterestService) Do(ctx context.Context) ([]HistoricalOpenInterest, error)
- func (s *GetHistoricalOpenInterestService) EndTime(endTime int64) *GetHistoricalOpenInterestService
- func (s *GetHistoricalOpenInterestService) StartTime(startTime int64) *GetHistoricalOpenInterestService
- type GetHistoricalOptionVolumeResponse
- type GetHistoricalPricesService
- func (s *GetHistoricalPricesService) Do(ctx context.Context) ([]HistoricalPrice, error)
- func (s *GetHistoricalPricesService) EndTime(endTime int64) *GetHistoricalPricesService
- func (s *GetHistoricalPricesService) MarketName(marketName string) *GetHistoricalPricesService
- func (s *GetHistoricalPricesService) Resolution(resolution int64) *GetHistoricalPricesService
- func (s *GetHistoricalPricesService) StartTime(startTime int64) *GetHistoricalPricesService
- type GetLendingHistoryResponse
- type GetLendingHistoryService
- type GetLendingInfoResponse
- type GetLendingInfoService
- type GetLendingOffersResponse
- type GetLendingOffersService
- type GetLendingRatesResponse
- type GetLendingRatesService
- type GetLeveragedTokenBalancesResponse
- type GetLeveragedTokenBalancesService
- type GetLeveragedTokenInfoResponse
- type GetLeveragedTokenInfoService
- type GetListFutureService
- type GetMarketInfoResponse
- type GetMarketsService
- type GetMyBorrowHistoryResponse
- type GetMyBorrowHistoryService
- type GetMyLendingHistoryResponse
- type GetMyLendingHistoryService
- type GetMyQuotesResponse
- type GetMyQuotesService
- type GetOpenOrdersService
- type GetOpenTriggerOrdersService
- type GetOptionOpenInterestResponse
- type GetOptionOpenInterestService
- type GetOptionsFillsResponse
- type GetOptionsFillsService
- type GetOptionsPositionsResponse
- type GetOptionsPositionsService
- type GetOrderBookService
- type GetOrderHistoryService
- func (s *GetOrderHistoryService) Do(ctx context.Context) ([]Order, bool, error)
- func (s *GetOrderHistoryService) EndTime(endTime int64) *GetOrderHistoryService
- func (s *GetOrderHistoryService) Market(market string) *GetOrderHistoryService
- func (s *GetOrderHistoryService) StartTime(startTime int64) *GetOrderHistoryService
- type GetOrderStatusByClientIDResponse
- type GetOrderStatusByClientIDService
- type GetOrderStatusResponse
- type GetOrderStatusService
- type GetPositionsService
- type GetPublicOptionsTradesResponse
- type GetPublicOptionsTradesService
- type GetQuotesForYourQuoteRequestResponse
- type GetQuotesForYourQuoteRequestService
- type GetSaveAddressesService
- type GetSingleMarketService
- type GetSpotMarginMarketInfoService
- type GetSubAccountBalanceResponse
- type GetSubAccountBalanceService
- type GetTradesService
- type GetTriggerOrderHistoryService
- func (s *GetTriggerOrderHistoryService) Do(ctx context.Context) ([]TriggerOrder, bool, error)
- func (s *GetTriggerOrderHistoryService) EndTime(endTime int64) *GetTriggerOrderHistoryService
- func (s *GetTriggerOrderHistoryService) Market(market string) *GetTriggerOrderHistoryService
- func (s *GetTriggerOrderHistoryService) OrderType(orderType OrderType) *GetTriggerOrderHistoryService
- func (s *GetTriggerOrderHistoryService) Side(orderSide Side) *GetTriggerOrderHistoryService
- func (s *GetTriggerOrderHistoryService) StartTime(startTime int64) *GetTriggerOrderHistoryService
- func (s *GetTriggerOrderHistoryService) TriggerType(triggerType TriggerType) *GetTriggerOrderHistoryService
- type GetTriggerOrderTriggersService
- type GetWithdrawHistoryService
- type GetWithdrawalFeesService
- func (s *GetWithdrawalFeesService) Address(address string) *GetWithdrawalFeesService
- func (s *GetWithdrawalFeesService) Coin(coin string) *GetWithdrawalFeesService
- func (s *GetWithdrawalFeesService) Do(ctx context.Context) (*WithdrawalFee, error)
- func (s *GetWithdrawalFeesService) Size(size float64) *GetWithdrawalFeesService
- func (s *GetWithdrawalFeesService) Tag(tag string) *GetWithdrawalFeesService
- type Historical24HVolume
- type HistoricalIndex
- type HistoricalIndexResponse
- type HistoricalOpenInterest
- type HistoricalPrice
- type HistoricalPricesResponse
- type LendingHistory
- type LendingInfo
- type LendingOffer
- type LendingRate
- type LeverageParams
- type LeveragedToken
- type LeveragedTokenBalance
- type LeveragedTokenCreationRequest
- type LeveragedTokenRedemptionRequest
- type ListFutureResponse
- type ListLeveragedTokenCreationRequestsResponse
- type ListLeveragedTokenCreationRequestsService
- type ListLeveragedTokenRedemptionRequestsResponse
- type ListLeveragedTokenRedemptionRequestsService
- type ListLeveragedTokensResponse
- type ListLeveragedTokensService
- type ListQuoteRequestsResponse
- type ListQuoteRequestsService
- type Market
- type MarketType
- type MarketsResponse
- type ModifyOrderByClientIDParams
- type ModifyOrderByClientIDResponse
- type ModifyOrderByClientIDService
- type ModifyOrderParams
- type ModifyOrderResponse
- type ModifyOrderService
- type ModifyTriggerOrderParams
- type ModifyTriggerOrderResponse
- type ModifyTriggerOrderService
- type OpenTriggerOrdersResponse
- type Option
- type OptionFill
- type OptionOpenInterest
- type OptionPosition
- type OptionQuote
- type OptionQuoteStatus
- type OptionType
- type OptionVolume24H
- type Order
- type OrderBook
- type OrderBookResponse
- type OrderBy
- type OrderHistoryResponse
- type OrderStatus
- type OrderTrigger
- type OrderType
- type OrdersResponse
- type PlaceOrderParams
- type PlaceOrderResponse
- type PlaceOrderService
- type PlaceTriggerOrderParams
- type PlaceTriggerOrderResponse
- type PlaceTriggerOrderService
- type Position
- type PositionsPerShare
- type PositionsResponse
- type PublicOptionTrade
- type QuoteRequest
- type QuotesForYourQuoteRequest
- type RequestETFRebalanceInfoResponse
- type RequestETFRebalanceInfoService
- type RequestLeveragedTokenCreation
- type RequestLeveragedTokenCreationParams
- type RequestLeveragedTokenCreationResponse
- type RequestLeveragedTokenCreationService
- type RequestLeveragedTokenRedemption
- type RequestLeveragedTokenRedemptionParams
- type RequestLeveragedTokenRedemptionResponse
- type RequestLeveragedTokenRedemptionService
- type RequestMsg
- type RestClientOption
- type SaveAddress
- type SaveAddressesResponse
- type Side
- type SingleMarketResponse
- type SubAccount
- type SubmitLendingOfferParams
- type SubmitLendingOfferResponse
- type SubmitLendingOfferService
- type Subscription
- type Trade
- type TradesResponse
- type TransferBetweenSubAccounts
- type TransferBetweenSubAccountsParams
- type TransferBetweenSubAccountsResponse
- type TransferBetweenSubAccountsService
- type TriggerOrder
- type TriggerOrderHistoryResponse
- type TriggerOrderTriggersResponse
- type TriggerType
- type UserLendingHistory
- type WebsocketService
- func (s *WebsocketService) Close()
- func (s *WebsocketService) Connect(dataHandler WsDataHandler, errHandler WsErrorHandler) error
- func (s *WebsocketService) ResetConnection()
- func (s *WebsocketService) SubAccount(sa string) *WebsocketService
- func (s *WebsocketService) Subscribe(sub Subscription) error
- func (s *WebsocketService) Unsubscribe(sub Subscription) error
- type Withdraw
- type WithdrawHistoryResponse
- type WithdrawParams
- type WithdrawResponse
- type WithdrawService
- type WithdrawalFee
- type WithdrawalFeesResponse
- type WsChannel
- type WsDataAction
- type WsDataHandler
- type WsErrorHandler
- type WsFTXPay
- type WsFTXPayEvent
- type WsFills
- type WsFillsEvent
- type WsFuture
- type WsGroupedOrderBook
- type WsGroupedOrderBookEvent
- type WsMarket
- type WsMarketsData
- type WsMarketsEvent
- type WsOrderBook
- type WsOrderBookEvent
- type WsOrders
- type WsOrdersEvent
- type WsReponse
- type WsTicker
- type WsTickerEvent
- type WsTrade
- type WsTradesEvent
- type YourQuote
- type YourQuoteRequest
- type YourQuoteRequestsResponse
- type YourQuoteRequestsService
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorRateLimit = errors.New("error rate limit")
)
Functions ¶
func StringToPointer ¶ added in v1.0.2
Types ¶
type AcceptOptionsQuoteResponse ¶
type AcceptOptionsQuoteResponse struct {
Result *OptionQuote `json:"result"`
// contains filtered or unexported fields
}
type AcceptOptionsQuoteService ¶
type AcceptOptionsQuoteService struct {
// contains filtered or unexported fields
}
func (*AcceptOptionsQuoteService) Do ¶
func (s *AcceptOptionsQuoteService) Do(ctx context.Context) (*OptionQuote, error)
func (*AcceptOptionsQuoteService) QuoteID ¶
func (s *AcceptOptionsQuoteService) QuoteID(quoteID int64) *AcceptOptionsQuoteService
type Account ¶
type Account struct {
BackstopProvider bool `json:"backstopProvider"`
Collateral float64 `json:"collateral"`
FreeCollateral float64 `json:"freeCollateral"`
InitialMarginRequirement float64 `json:"initialMarginRequirement"`
Leverage float64 `json:"leverage"`
Liquidating bool `json:"liquidating"`
MaintenanceMarginRequirement float64 `json:"maintenanceMarginRequirement"`
MakerFee float64 `json:"makerFee"`
MarginFraction float64 `json:"marginFraction"`
OpenMarginFraction float64 `json:"openMarginFraction"`
TakerFee float64 `json:"takerFee"`
TotalAccountValue float64 `json:"totalAccountValue"`
TotalPositionSize float64 `json:"totalPositionSize"`
Username string `json:"username"`
Positions []Position `json:"positions"`
}
type AccountOptionsInfo ¶
type AccountOptionsInfo struct {
UsdBalance float64 `json:"usdBalance"`
LiquidationPrice float64 `json:"liquidationPrice"`
Liquidating bool `json:"liquidating"`
MaintenanceMarginRequirement float64 `json:"maintenanceMarginRequirement"`
InitialMarginRequirement float64 `json:"initialMarginRequirement"`
}
type AccountResponse ¶
type AccountResponse struct {
Result *Account `json:"result"`
// contains filtered or unexported fields
}
type AirdropsResponse ¶
type AirdropsResponse struct {
Result []Airdrop `json:"result"`
// contains filtered or unexported fields
}
type AllBalance ¶
type AllBalancesResponse ¶
type AllBalancesResponse struct {
Result AllBalance `json:"result"`
// contains filtered or unexported fields
}
type BalancesResponse ¶
type BalancesResponse struct {
Result []Balance `json:"result"`
// contains filtered or unexported fields
}
type BorrowHistory ¶
type BorrowRate ¶
type CancelAllOrderParams ¶
type CancelAllOrderResponse ¶
type CancelAllOrderResponse struct {
// contains filtered or unexported fields
}
type CancelAllOrderService ¶
type CancelAllOrderService struct {
// contains filtered or unexported fields
}
func (*CancelAllOrderService) Params ¶
func (s *CancelAllOrderService) Params(params CancelAllOrderParams) *CancelAllOrderService
type CancelOrderByClientIDResponse ¶
type CancelOrderByClientIDResponse struct {
// contains filtered or unexported fields
}
type CancelOrderByClientIDService ¶
type CancelOrderByClientIDService struct {
// contains filtered or unexported fields
}
func (*CancelOrderByClientIDService) ClientID ¶
func (s *CancelOrderByClientIDService) ClientID(clientID string) *CancelOrderByClientIDService
type CancelOrderResponse ¶
type CancelOrderResponse struct {
// contains filtered or unexported fields
}
type CancelOrderService ¶
type CancelOrderService struct {
// contains filtered or unexported fields
}
func (*CancelOrderService) OrderID ¶
func (s *CancelOrderService) OrderID(orderID int64) *CancelOrderService
type CancelQuoteRequest ¶
type CancelQuoteRequestResponse ¶
type CancelQuoteRequestResponse struct {
Result *CancelQuoteRequest `json:"result"`
// contains filtered or unexported fields
}
type CancelQuoteRequestService ¶
type CancelQuoteRequestService struct {
// contains filtered or unexported fields
}
func (*CancelQuoteRequestService) Do ¶
func (s *CancelQuoteRequestService) Do(ctx context.Context) (*CancelQuoteRequest, error)
func (*CancelQuoteRequestService) RequestID ¶
func (s *CancelQuoteRequestService) RequestID(requestID int64) *CancelQuoteRequestService
type CancelQuoteResponse ¶
type CancelQuoteResponse struct {
Result *OptionQuote `json:"result"`
// contains filtered or unexported fields
}
type CancelQuoteService ¶
type CancelQuoteService struct {
// contains filtered or unexported fields
}
func (*CancelQuoteService) Do ¶
func (s *CancelQuoteService) Do(ctx context.Context) (*OptionQuote, error)
func (*CancelQuoteService) QuoteID ¶
func (s *CancelQuoteService) QuoteID(quoteID int64) *CancelQuoteService
type CancelTriggerOrderResponse ¶
type CancelTriggerOrderResponse struct {
// contains filtered or unexported fields
}
type CancelTriggerOrderService ¶
type CancelTriggerOrderService struct {
// contains filtered or unexported fields
}
func (*CancelTriggerOrderService) Do ¶
func (s *CancelTriggerOrderService) Do(ctx context.Context) error
func (*CancelTriggerOrderService) OrderID ¶
func (s *CancelTriggerOrderService) OrderID(orderID int64) *CancelTriggerOrderService
type ChangeAccountLeverageResponse ¶
type ChangeAccountLeverageResponse struct {
// contains filtered or unexported fields
}
type ChangeAccountLeverageService ¶
type ChangeAccountLeverageService struct {
// contains filtered or unexported fields
}
func (*ChangeAccountLeverageService) Do ¶
func (s *ChangeAccountLeverageService) Do(ctx context.Context) error
func (*ChangeAccountLeverageService) Params ¶
func (s *ChangeAccountLeverageService) Params(params LeverageParams) *ChangeAccountLeverageService
type ChangeSubAccountNameResponse ¶
type ChangeSubAccountNameResponse struct {
// contains filtered or unexported fields
}
type ChangeSubAccountNameService ¶
type ChangeSubAccountNameService struct {
// contains filtered or unexported fields
}
func (*ChangeSubAccountNameService) Do ¶
func (s *ChangeSubAccountNameService) Do(ctx context.Context) error
func (*ChangeSubAccountNameService) Params ¶
func (s *ChangeSubAccountNameService) Params(params ChangeSubAccountNameParams) *ChangeSubAccountNameService
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(apiKey, apiSecret string, opts ...RestClientOption) *Client
func (*Client) NewAcceptOptionsQuoteService ¶
func (c *Client) NewAcceptOptionsQuoteService() *AcceptOptionsQuoteService
func (*Client) NewCancelAllOrderService ¶
func (c *Client) NewCancelAllOrderService() *CancelAllOrderService
func (*Client) NewCancelOrderByClientIDService ¶
func (c *Client) NewCancelOrderByClientIDService() *CancelOrderByClientIDService
func (*Client) NewCancelOrderService ¶
func (c *Client) NewCancelOrderService() *CancelOrderService
func (*Client) NewCancelQuoteRequestService ¶
func (c *Client) NewCancelQuoteRequestService() *CancelQuoteRequestService
func (*Client) NewCancelQuoteService ¶
func (c *Client) NewCancelQuoteService() *CancelQuoteService
func (*Client) NewCancelTriggerOrderService ¶
func (c *Client) NewCancelTriggerOrderService() *CancelTriggerOrderService
func (*Client) NewChangeAccountLeverageService ¶
func (c *Client) NewChangeAccountLeverageService() *ChangeAccountLeverageService
func (*Client) NewChangeSubAccountNameService ¶
func (c *Client) NewChangeSubAccountNameService() *ChangeSubAccountNameService
func (*Client) NewCreateQuoteRequestService ¶
func (c *Client) NewCreateQuoteRequestService() *CreateQuoteRequestService
func (*Client) NewCreateQuoteService ¶
func (c *Client) NewCreateQuoteService() *CreateQuoteService
func (*Client) NewCreateSaveAddressesService ¶
func (c *Client) NewCreateSaveAddressesService() *CreateSaveAddressesService
func (*Client) NewCreateSubAccountService ¶
func (c *Client) NewCreateSubAccountService() *CreateSubAccountService
func (*Client) NewDeleteSaveAddressesService ¶
func (c *Client) NewDeleteSaveAddressesService() *DeleteSaveAddressesService
func (*Client) NewDeleteSubAccountService ¶
func (c *Client) NewDeleteSubAccountService() *DeleteSubAccountService
func (*Client) NewFundingPaymentsService ¶
func (c *Client) NewFundingPaymentsService() *FundingPaymentsService
func (*Client) NewGet24HOptionVolumeService ¶
func (c *Client) NewGet24HOptionVolumeService() *Get24HOptionVolumeService
func (*Client) NewGetAccountOptionsInfoService ¶
func (c *Client) NewGetAccountOptionsInfoService() *GetAccountOptionsInfoService
func (*Client) NewGetAccountService ¶
func (c *Client) NewGetAccountService() *GetAccountService
func (*Client) NewGetAirdropsService ¶
func (c *Client) NewGetAirdropsService() *GetAirdropsService
func (*Client) NewGetAllBalancesService ¶
func (c *Client) NewGetAllBalancesService() *GetAllBalancesService
func (*Client) NewGetAllSubAccountsService ¶
func (c *Client) NewGetAllSubAccountsService() *GetAllSubAccountsService
func (*Client) NewGetBalancesService ¶
func (c *Client) NewGetBalancesService() *GetBalancesService
func (*Client) NewGetBorrowRatesService ¶
func (c *Client) NewGetBorrowRatesService() *GetBorrowRatesService
func (*Client) NewGetCoinsService ¶
func (c *Client) NewGetCoinsService() *GetCoinsService
func (*Client) NewGetDailyBorrowedAmountsService ¶
func (c *Client) NewGetDailyBorrowedAmountsService() *GetDailyBorrowedAmountsService
func (*Client) NewGetDepositAddressListService ¶
func (c *Client) NewGetDepositAddressListService() *GetDepositAddressListService
func (*Client) NewGetDepositAddressService ¶
func (c *Client) NewGetDepositAddressService() *GetDepositAddressService
func (*Client) NewGetDepositHistoryService ¶
func (c *Client) NewGetDepositHistoryService() *GetDepositHistoryService
func (*Client) NewGetExpiredFuturesService ¶
func (c *Client) NewGetExpiredFuturesService() *GetExpiredFuturesService
func (*Client) NewGetFutureFundingRateService ¶
func (c *Client) NewGetFutureFundingRateService() *GetFutureFundingRateService
func (*Client) NewGetFutureIndexWeightsService ¶
func (c *Client) NewGetFutureIndexWeightsService() *GetFutureIndexWeightsService
func (*Client) NewGetFutureService ¶
func (c *Client) NewGetFutureService() *GetFutureService
func (*Client) NewGetFutureStatsService ¶
func (c *Client) NewGetFutureStatsService() *GetFutureStatsService
func (*Client) NewGetHistorical24HOptionVolumeService ¶
func (c *Client) NewGetHistorical24HOptionVolumeService() *GetHistorical24HOptionVolumeService
func (*Client) NewGetHistoricalIndexService ¶
func (c *Client) NewGetHistoricalIndexService() *GetHistoricalIndexService
func (*Client) NewGetHistoricalOpenInterestService ¶
func (c *Client) NewGetHistoricalOpenInterestService() *GetHistoricalOpenInterestService
func (*Client) NewGetHistoricalPricesService ¶
func (c *Client) NewGetHistoricalPricesService() *GetHistoricalPricesService
func (*Client) NewGetLendingHistoryService ¶
func (c *Client) NewGetLendingHistoryService() *GetLendingHistoryService
func (*Client) NewGetLendingInfoService ¶
func (c *Client) NewGetLendingInfoService() *GetLendingInfoService
func (*Client) NewGetLendingOffersService ¶
func (c *Client) NewGetLendingOffersService() *GetLendingOffersService
func (*Client) NewGetLendingRatesService ¶
func (c *Client) NewGetLendingRatesService() *GetLendingRatesService
func (*Client) NewGetLeveragedTokenBalancesService ¶
func (c *Client) NewGetLeveragedTokenBalancesService() *GetLeveragedTokenBalancesService
func (*Client) NewGetLeveragedTokenInfoService ¶
func (c *Client) NewGetLeveragedTokenInfoService() *GetLeveragedTokenInfoService
func (*Client) NewGetListFutureService ¶
func (c *Client) NewGetListFutureService() *GetListFutureService
func (*Client) NewGetMarketsService ¶
func (c *Client) NewGetMarketsService() *GetMarketsService
func (*Client) NewGetMyBorrowHistoryService ¶
func (c *Client) NewGetMyBorrowHistoryService() *GetMyBorrowHistoryService
func (*Client) NewGetMyLendingHistoryService ¶
func (c *Client) NewGetMyLendingHistoryService() *GetMyLendingHistoryService
func (*Client) NewGetMyQuotesService ¶
func (c *Client) NewGetMyQuotesService() *GetMyQuotesService
func (*Client) NewGetOpenOrdersService ¶
func (c *Client) NewGetOpenOrdersService() *GetOpenOrdersService
func (*Client) NewGetOpenTriggerOrdersService ¶
func (c *Client) NewGetOpenTriggerOrdersService() *GetOpenTriggerOrdersService
func (*Client) NewGetOptionOpenInterestService ¶
func (c *Client) NewGetOptionOpenInterestService() *GetOptionOpenInterestService
func (*Client) NewGetOrderBookService ¶
func (c *Client) NewGetOrderBookService() *GetOrderBookService
func (*Client) NewGetOrderHistoryService ¶
func (c *Client) NewGetOrderHistoryService() *GetOrderHistoryService
func (*Client) NewGetOrderStatusByClientIDService ¶
func (c *Client) NewGetOrderStatusByClientIDService() *GetOrderStatusByClientIDService
func (*Client) NewGetOrderStatusService ¶
func (c *Client) NewGetOrderStatusService() *GetOrderStatusService
func (*Client) NewGetPositionsService ¶
func (c *Client) NewGetPositionsService() *GetPositionsService
func (*Client) NewGetPublicOptionsTradesService ¶
func (c *Client) NewGetPublicOptionsTradesService() *GetPublicOptionsTradesService
func (*Client) NewGetQuotesForYourQuoteRequestService ¶
func (c *Client) NewGetQuotesForYourQuoteRequestService() *GetQuotesForYourQuoteRequestService
func (*Client) NewGetSaveAddressesService ¶
func (c *Client) NewGetSaveAddressesService() *GetSaveAddressesService
func (*Client) NewGetSingleMarketsService ¶
func (c *Client) NewGetSingleMarketsService() *GetSingleMarketService
func (*Client) NewGetSpotMarginMarketInfoService ¶
func (c *Client) NewGetSpotMarginMarketInfoService() *GetSpotMarginMarketInfoService
func (*Client) NewGetTradesService ¶
func (c *Client) NewGetTradesService() *GetTradesService
func (*Client) NewGetTriggerOrderHistoryService ¶
func (c *Client) NewGetTriggerOrderHistoryService() *GetTriggerOrderHistoryService
func (*Client) NewGetWithdrawHistoryService ¶
func (c *Client) NewGetWithdrawHistoryService() *GetWithdrawHistoryService
func (*Client) NewGetWithdrawalFeesService ¶
func (c *Client) NewGetWithdrawalFeesService() *GetWithdrawalFeesService
func (*Client) NewListLeveragedTokenCreationRequestsService ¶
func (c *Client) NewListLeveragedTokenCreationRequestsService() *ListLeveragedTokenCreationRequestsService
func (*Client) NewListLeveragedTokenRedemptionRequestsService ¶
func (c *Client) NewListLeveragedTokenRedemptionRequestsService() *ListLeveragedTokenRedemptionRequestsService
func (*Client) NewListLeveragedTokensService ¶
func (c *Client) NewListLeveragedTokensService() *ListLeveragedTokensService
func (*Client) NewListQuoteRequestsService ¶
func (c *Client) NewListQuoteRequestsService() *ListQuoteRequestsService
func (*Client) NewModifyOrderByClientIDService ¶
func (c *Client) NewModifyOrderByClientIDService() *ModifyOrderByClientIDService
func (*Client) NewModifyOrderService ¶
func (c *Client) NewModifyOrderService() *ModifyOrderService
func (*Client) NewModifyTriggerOrderService ¶
func (c *Client) NewModifyTriggerOrderService() *ModifyTriggerOrderService
func (*Client) NewPlaceOrderService ¶
func (c *Client) NewPlaceOrderService() *PlaceOrderService
func (*Client) NewPlaceTriggerOrderService ¶
func (c *Client) NewPlaceTriggerOrderService() *PlaceTriggerOrderService
func (*Client) NewRequestETFRebalanceInfoService ¶
func (c *Client) NewRequestETFRebalanceInfoService() *RequestETFRebalanceInfoService
func (*Client) NewRequestLeveragedTokenCreationService ¶
func (c *Client) NewRequestLeveragedTokenCreationService() *RequestLeveragedTokenCreationService
func (*Client) NewRequestLeveragedTokenRedemptionService ¶
func (c *Client) NewRequestLeveragedTokenRedemptionService() *RequestLeveragedTokenRedemptionService
func (*Client) NewSubmitLendingOfferService ¶
func (c *Client) NewSubmitLendingOfferService() *SubmitLendingOfferService
func (*Client) NewTransferBetweenSubAccountsService ¶
func (c *Client) NewTransferBetweenSubAccountsService() *TransferBetweenSubAccountsService
func (*Client) NewWithdrawService ¶
func (c *Client) NewWithdrawService() *WithdrawService
func (*Client) NewYourQuoteRequestsService ¶
func (c *Client) NewYourQuoteRequestsService() *YourQuoteRequestsService
func (*Client) SubAccount ¶
type Coin ¶
type Coin struct {
Bep2Asset *string `json:"bep2Asset"`
CanConvert bool `json:"canConvert"`
CanDeposit bool `json:"canDeposit"`
CanWithdraw bool `json:"canWithdraw"`
Collateral bool `json:"collateral"`
CollateralWeight float64 `json:"collateralWeight"`
CreditTo *string `json:"creditTo"`
Erc20Contract string `json:"erc20Contract"`
Fiat bool `json:"fiat"`
HasTag bool `json:"hasTag"`
ID string `json:"id"`
IsToken bool `json:"isToken"`
Methods []string `json:"methods"`
Name string `json:"name"`
SplMint string `json:"splMint"`
Trc20Contract string `json:"trc20Contract"`
UsdFungible bool `json:"usdFungible"`
}
type CoinSpotMarginInfo ¶
type CoinsResponse ¶
type CoinsResponse struct {
Result []Coin `json:"result"`
// contains filtered or unexported fields
}
type CreateAddressesResponse ¶
type CreateAddressesResponse struct {
Result *SaveAddress `json:"result"`
// contains filtered or unexported fields
}
type CreateQuoteParams ¶
type CreateQuoteParams struct {
Price float64 `json:"price"`
}
type CreateQuoteRequest ¶
type CreateQuoteRequest struct {
ID int64 `json:"id"`
Option Option `json:"option"`
Expiry time.Time `json:"expiry"`
Strike float64 `json:"strike"`
Type OptionType `json:"type"`
Underlying string `json:"underlying"`
RequestExpiry time.Time `json:"requestExpiry"`
Side Side `json:"side"`
Size float64 `json:"size"`
Status OrderStatus `json:"status"`
Time time.Time `json:"time"`
}
type CreateQuoteRequestParams ¶
type CreateQuoteRequestParams struct {
Underlying string `json:"underlying"`
Type string `json:"type"`
Strike float64 `json:"strike"`
Expiry int64 `json:"expiry"`
Side Side `json:"side"`
Size float64 `json:"size"`
LimitPrice *float64 `json:"limitPrice,omitempty"`
HideLimitPrice bool `json:"hideLimitPrice"`
RequestExpiry *float64 `json:"requestExpiry,omitempty"`
CounterpartyId *int64 `json:"counterpartyId,omitempty"`
}
type CreateQuoteRequestResponse ¶
type CreateQuoteRequestResponse struct {
Result *CreateQuoteRequest `json:"result"`
// contains filtered or unexported fields
}
type CreateQuoteRequestService ¶
type CreateQuoteRequestService struct {
// contains filtered or unexported fields
}
func (*CreateQuoteRequestService) Do ¶
func (s *CreateQuoteRequestService) Do(ctx context.Context) (*CreateQuoteRequest, error)
func (*CreateQuoteRequestService) Params ¶
func (s *CreateQuoteRequestService) Params(params CreateQuoteRequestParams) *CreateQuoteRequestService
type CreateQuoteResponse ¶
type CreateQuoteResponse struct {
Result *OptionQuote `json:"result"`
// contains filtered or unexported fields
}
type CreateQuoteService ¶
type CreateQuoteService struct {
// contains filtered or unexported fields
}
func (*CreateQuoteService) Do ¶
func (s *CreateQuoteService) Do(ctx context.Context) (*OptionQuote, error)
func (*CreateQuoteService) Params ¶
func (s *CreateQuoteService) Params(params CreateQuoteParams) *CreateQuoteService
func (*CreateQuoteService) RequestID ¶
func (s *CreateQuoteService) RequestID(requestID int64) *CreateQuoteService
type CreateSaveAddressParams ¶
type CreateSaveAddressesService ¶
type CreateSaveAddressesService struct {
// contains filtered or unexported fields
}
func (*CreateSaveAddressesService) Do ¶
func (s *CreateSaveAddressesService) Do(ctx context.Context) (*SaveAddress, error)
func (*CreateSaveAddressesService) Params ¶
func (s *CreateSaveAddressesService) Params(params CreateSaveAddressParams) *CreateSaveAddressesService
type CreateSubAccountParams ¶
type CreateSubAccountParams struct {
Nickname string `json:"nickname"`
}
type CreateSubAccountResponse ¶
type CreateSubAccountResponse struct {
Result *SubAccount `json:"result"`
// contains filtered or unexported fields
}
type CreateSubAccountService ¶
type CreateSubAccountService struct {
// contains filtered or unexported fields
}
func (*CreateSubAccountService) Do ¶
func (s *CreateSubAccountService) Do(ctx context.Context) (*SubAccount, error)
func (*CreateSubAccountService) Params ¶
func (s *CreateSubAccountService) Params(params CreateSubAccountParams) *CreateSubAccountService
type DailyBorrowedAmounts ¶
type DeleteAddressesResponse ¶
type DeleteAddressesResponse struct {
Result *string `json:"result"`
// contains filtered or unexported fields
}
type DeleteSaveAddressesService ¶
type DeleteSaveAddressesService struct {
// contains filtered or unexported fields
}
func (*DeleteSaveAddressesService) Do ¶
func (s *DeleteSaveAddressesService) Do(ctx context.Context) (*string, error)
func (*DeleteSaveAddressesService) SaveAddressID ¶
func (s *DeleteSaveAddressesService) SaveAddressID(saveAddressID int64) *DeleteSaveAddressesService
type DeleteSubAccountParams ¶
type DeleteSubAccountParams struct {
Nickname string `json:"nickname"`
}
type DeleteSubAccountResponse ¶
type DeleteSubAccountResponse struct {
// contains filtered or unexported fields
}
type DeleteSubAccountService ¶
type DeleteSubAccountService struct {
// contains filtered or unexported fields
}
func (*DeleteSubAccountService) Do ¶
func (s *DeleteSubAccountService) Do(ctx context.Context) error
func (*DeleteSubAccountService) Params ¶
func (s *DeleteSubAccountService) Params(params DeleteSubAccountParams) *DeleteSubAccountService
type DepositAddress ¶
type DepositAddressList ¶
type DepositAddressResponse ¶
type DepositAddressResponse struct {
Result *DepositAddress `json:"result"`
// contains filtered or unexported fields
}
type DepositHistory ¶
type DepositHistory struct {
Coin string `json:"coin"`
Confirmations int `json:"confirmations"`
ConfirmedTime time.Time `json:"confirmedTime"`
Fee float64 `json:"fee"`
ID int64 `json:"id"`
SentTime time.Time `json:"sentTime"`
Size float64 `json:"size"`
Status string `json:"status"`
Time time.Time `json:"time"`
Txid string `json:"txid"`
}
type DepositHistoryResponse ¶
type DepositHistoryResponse struct {
Result []DepositHistory `json:"result"`
// contains filtered or unexported fields
}
type ETFRebalanceInfo ¶
type ExpiredFuture ¶
type ExpiredFuture struct {
Ask *float64 `json:"ask"`
Bid *float64 `json:"bid"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
Expired bool `json:"expired"`
Expiry time.Time `json:"expiry"`
ExpiryDescription string `json:"expiryDescription"`
Group string `json:"group"`
ImfFactor float64 `json:"imfFactor"`
Index float64 `json:"index"`
Last float64 `json:"last"`
LowerBound float64 `json:"lowerBound"`
MarginPrice float64 `json:"marginPrice"`
Mark float64 `json:"mark"`
MoveStart interface{} `json:"moveStart"`
Name string `json:"name"`
Perpetual bool `json:"perpetual"`
PositionLimitWeight float64 `json:"positionLimitWeight"`
PostOnly bool `json:"postOnly"`
PriceIncrement float64 `json:"priceIncrement"`
SizeIncrement float64 `json:"sizeIncrement"`
Type string `json:"type"`
Underlying string `json:"underlying"`
UnderlyingDescription string `json:"underlyingDescription"`
UpperBound float64 `json:"upperBound"`
}
type ExpiredFuturesResponse ¶
type ExpiredFuturesResponse struct {
Result []ExpiredFuture `json:"result"`
// contains filtered or unexported fields
}
type Feed ¶
func (*Feed) UnmarshalJSON ¶
type Fill ¶
type Fill struct {
Fee float64 `json:"fee"`
FeeCurrency string `json:"feeCurrency"`
FeeRate float64 `json:"feeRate"`
Future string `json:"future"`
ID int `json:"id"`
Liquidity string `json:"liquidity"`
Market string `json:"market"`
BaseCurrency interface{} `json:"baseCurrency"`
QuoteCurrency interface{} `json:"quoteCurrency"`
OrderID int `json:"orderId"`
TradeID int `json:"tradeId"`
Price float64 `json:"price"`
Side string `json:"side"`
Size float64 `json:"size"`
Time time.Time `json:"time"`
Type string `json:"type"`
}
type FillResponse ¶
type FillResponse struct {
Result []Fill `json:"result"`
// contains filtered or unexported fields
}
type FillsService ¶
type FillsService struct {
// contains filtered or unexported fields
}
func (*FillsService) EndTime ¶
func (s *FillsService) EndTime(endTime int64) *FillsService
func (*FillsService) Market ¶
func (s *FillsService) Market(market string) *FillsService
func (*FillsService) Order ¶
func (s *FillsService) Order(order OrderBy) *FillsService
func (*FillsService) OrderID ¶
func (s *FillsService) OrderID(orderID int64) *FillsService
func (*FillsService) StartTime ¶
func (s *FillsService) StartTime(startTime int64) *FillsService
type FundingPayment ¶
type FundingPaymentsResponse ¶
type FundingPaymentsResponse struct {
Result []FundingPayment `json:"result"`
// contains filtered or unexported fields
}
type FundingPaymentsService ¶
type FundingPaymentsService struct {
// contains filtered or unexported fields
}
func (*FundingPaymentsService) Do ¶
func (s *FundingPaymentsService) Do(ctx context.Context) ([]FundingPayment, error)
func (*FundingPaymentsService) EndTime ¶
func (s *FundingPaymentsService) EndTime(endTime int64) *FundingPaymentsService
func (*FundingPaymentsService) Future ¶
func (s *FundingPaymentsService) Future(future string) *FundingPaymentsService
func (*FundingPaymentsService) StartTime ¶
func (s *FundingPaymentsService) StartTime(startTime int64) *FundingPaymentsService
type Future ¶
type Future struct {
Ask float64 `json:"ask"`
Bid float64 `json:"bid"`
Change1H float64 `json:"change1h"`
Change24H float64 `json:"change24h"`
ChangeBod float64 `json:"changeBod"`
VolumeUsd24H float64 `json:"volumeUsd24h"`
Volume float64 `json:"volume"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
Expired bool `json:"expired"`
Expiry time.Time `json:"expiry"`
Index float64 `json:"index"`
ImfFactor float64 `json:"imfFactor"`
Last float64 `json:"last"`
LowerBound float64 `json:"lowerBound"`
Mark float64 `json:"mark"`
Name string `json:"name"`
OpenInterest float64 `json:"openInterest"`
OpenInterestUsd float64 `json:"openInterestUsd"`
Perpetual bool `json:"perpetual"`
PositionLimitWeight float64 `json:"positionLimitWeight"`
PostOnly bool `json:"postOnly"`
PriceIncrement float64 `json:"priceIncrement"`
SizeIncrement float64 `json:"sizeIncrement"`
Underlying string `json:"underlying"`
UpperBound float64 `json:"upperBound"`
Type string `json:"type"`
}
type FutureFundingRate ¶
type FutureFundingRateResponse ¶
type FutureFundingRateResponse struct {
Result []FutureFundingRate `json:"result"`
// contains filtered or unexported fields
}
type FutureIndexWeights ¶
type FutureIndexWeightsResponse ¶
type FutureIndexWeightsResponse struct {
Result FutureIndexWeights `json:"result"`
// contains filtered or unexported fields
}
type FutureResponse ¶
type FutureResponse struct {
Result *Future `json:"result"`
// contains filtered or unexported fields
}
type FutureStats ¶
type FutureStats struct {
Volume float64 `json:"volume"`
NextFundingRate float64 `json:"nextFundingRate"`
NextFundingTime time.Time `json:"nextFundingTime"`
ExpirationPrice float64 `json:"expirationPrice"`
PredictedExpirationPrice float64 `json:"predictedExpirationPrice"`
StrikePrice float64 `json:"strikePrice"`
OpenInterest float64 `json:"openInterest"`
}
type FutureStatsResponse ¶
type FutureStatsResponse struct {
Result *FutureStats `json:"result"`
// contains filtered or unexported fields
}
type Get24HOptionVolumeResponse ¶
type Get24HOptionVolumeResponse struct {
Result *OptionVolume24H `json:"result"`
// contains filtered or unexported fields
}
type Get24HOptionVolumeService ¶
type Get24HOptionVolumeService struct {
// contains filtered or unexported fields
}
func (*Get24HOptionVolumeService) Do ¶
func (s *Get24HOptionVolumeService) Do(ctx context.Context) (*OptionVolume24H, error)
type GetAccountOptionsInfoResponse ¶
type GetAccountOptionsInfoResponse struct {
Result *AccountOptionsInfo `json:"result"`
// contains filtered or unexported fields
}
type GetAccountOptionsInfoService ¶
type GetAccountOptionsInfoService struct {
// contains filtered or unexported fields
}
func (*GetAccountOptionsInfoService) Do ¶
func (s *GetAccountOptionsInfoService) Do(ctx context.Context) (*AccountOptionsInfo, error)
type GetAccountService ¶
type GetAccountService struct {
// contains filtered or unexported fields
}
type GetAirdropsService ¶
type GetAirdropsService struct {
// contains filtered or unexported fields
}
func (*GetAirdropsService) Do ¶
func (s *GetAirdropsService) Do(ctx context.Context) ([]Airdrop, error)
func (*GetAirdropsService) EndTime ¶
func (s *GetAirdropsService) EndTime(endTime int64) *GetAirdropsService
func (*GetAirdropsService) StartTime ¶
func (s *GetAirdropsService) StartTime(startTime int64) *GetAirdropsService
type GetAllBalancesService ¶
type GetAllBalancesService struct {
// contains filtered or unexported fields
}
func (*GetAllBalancesService) Do ¶
func (s *GetAllBalancesService) Do(ctx context.Context) (AllBalance, error)
type GetAllSubAccountsResponse ¶
type GetAllSubAccountsResponse struct {
Result []SubAccount `json:"result"`
// contains filtered or unexported fields
}
type GetAllSubAccountsService ¶
type GetAllSubAccountsService struct {
// contains filtered or unexported fields
}
func (*GetAllSubAccountsService) Do ¶
func (s *GetAllSubAccountsService) Do(ctx context.Context) ([]SubAccount, error)
type GetBalancesService ¶
type GetBalancesService struct {
// contains filtered or unexported fields
}
type GetBorrowRatesResponse ¶
type GetBorrowRatesResponse struct {
Result []BorrowRate `json:"result"`
// contains filtered or unexported fields
}
type GetBorrowRatesService ¶
type GetBorrowRatesService struct {
// contains filtered or unexported fields
}
func (*GetBorrowRatesService) Do ¶
func (s *GetBorrowRatesService) Do(ctx context.Context) ([]BorrowRate, error)
type GetCoinsService ¶
type GetCoinsService struct {
// contains filtered or unexported fields
}
type GetDailyBorrowedAmountsResponse ¶
type GetDailyBorrowedAmountsResponse struct {
Result []DailyBorrowedAmounts `json:"result"`
// contains filtered or unexported fields
}
type GetDailyBorrowedAmountsService ¶
type GetDailyBorrowedAmountsService struct {
// contains filtered or unexported fields
}
func (*GetDailyBorrowedAmountsService) Do ¶
func (s *GetDailyBorrowedAmountsService) Do(ctx context.Context) ([]DailyBorrowedAmounts, error)
type GetDepositAddressListResponse ¶
type GetDepositAddressListResponse struct {
Result *DepositAddressList `json:"result"`
// contains filtered or unexported fields
}
type GetDepositAddressListService ¶
type GetDepositAddressListService struct {
// contains filtered or unexported fields
}
func (*GetDepositAddressListService) Do ¶
func (s *GetDepositAddressListService) Do(ctx context.Context) (*DepositAddressList, error)
type GetDepositAddressService ¶
type GetDepositAddressService struct {
// contains filtered or unexported fields
}
func (*GetDepositAddressService) Coin ¶
func (s *GetDepositAddressService) Coin(c string) *GetDepositAddressService
func (*GetDepositAddressService) Do ¶
func (s *GetDepositAddressService) Do(ctx context.Context) (*DepositAddress, error)
func (*GetDepositAddressService) Method ¶
func (s *GetDepositAddressService) Method(method string) *GetDepositAddressService
type GetDepositHistoryService ¶
type GetDepositHistoryService struct {
// contains filtered or unexported fields
}
func (*GetDepositHistoryService) Do ¶
func (s *GetDepositHistoryService) Do(ctx context.Context) ([]DepositHistory, error)
func (*GetDepositHistoryService) EndTime ¶
func (s *GetDepositHistoryService) EndTime(endTime int64) *GetDepositHistoryService
func (*GetDepositHistoryService) StartTime ¶
func (s *GetDepositHistoryService) StartTime(startTime int64) *GetDepositHistoryService
type GetExpiredFuturesService ¶
type GetExpiredFuturesService struct {
// contains filtered or unexported fields
}
func (*GetExpiredFuturesService) Do ¶
func (s *GetExpiredFuturesService) Do(ctx context.Context) ([]ExpiredFuture, error)
type GetFutureFundingRateService ¶
type GetFutureFundingRateService struct {
// contains filtered or unexported fields
}
func (*GetFutureFundingRateService) Do ¶
func (s *GetFutureFundingRateService) Do(ctx context.Context) ([]FutureFundingRate, error)
func (*GetFutureFundingRateService) EndTime ¶
func (s *GetFutureFundingRateService) EndTime(endTime int64) *GetFutureFundingRateService
func (*GetFutureFundingRateService) Future ¶
func (s *GetFutureFundingRateService) Future(future string) *GetFutureFundingRateService
func (*GetFutureFundingRateService) StartTime ¶
func (s *GetFutureFundingRateService) StartTime(startTime int64) *GetFutureFundingRateService
type GetFutureIndexWeightsService ¶
type GetFutureIndexWeightsService struct {
// contains filtered or unexported fields
}
func (*GetFutureIndexWeightsService) Do ¶
func (s *GetFutureIndexWeightsService) Do(ctx context.Context) (FutureIndexWeights, error)
type GetFutureService ¶
type GetFutureService struct {
// contains filtered or unexported fields
}
func (*GetFutureService) FutureName ¶
func (s *GetFutureService) FutureName(futureName string) *GetFutureService
type GetFutureStatsService ¶
type GetFutureStatsService struct {
// contains filtered or unexported fields
}
func (*GetFutureStatsService) Do ¶
func (s *GetFutureStatsService) Do(ctx context.Context) (*FutureStats, error)
func (*GetFutureStatsService) FutureName ¶
func (s *GetFutureStatsService) FutureName(futureName string) *GetFutureStatsService
type GetHistorical24HOptionVolumeService ¶
type GetHistorical24HOptionVolumeService struct {
// contains filtered or unexported fields
}
func (*GetHistorical24HOptionVolumeService) Do ¶
func (s *GetHistorical24HOptionVolumeService) Do(ctx context.Context) ([]Historical24HVolume, error)
func (*GetHistorical24HOptionVolumeService) EndTime ¶
func (s *GetHistorical24HOptionVolumeService) EndTime(endTime int64) *GetHistorical24HOptionVolumeService
func (*GetHistorical24HOptionVolumeService) StartTime ¶
func (s *GetHistorical24HOptionVolumeService) StartTime(startTime int64) *GetHistorical24HOptionVolumeService
type GetHistoricalIndexService ¶
type GetHistoricalIndexService struct {
// contains filtered or unexported fields
}
func (*GetHistoricalIndexService) Do ¶
func (s *GetHistoricalIndexService) Do(ctx context.Context) ([]HistoricalIndex, error)
func (*GetHistoricalIndexService) EndTime ¶
func (s *GetHistoricalIndexService) EndTime(endTime int64) *GetHistoricalIndexService
func (*GetHistoricalIndexService) MarketName ¶
func (s *GetHistoricalIndexService) MarketName(marketName string) *GetHistoricalIndexService
func (*GetHistoricalIndexService) Resolution ¶
func (s *GetHistoricalIndexService) Resolution(resolution int64) *GetHistoricalIndexService
func (*GetHistoricalIndexService) StartTime ¶
func (s *GetHistoricalIndexService) StartTime(startTime int64) *GetHistoricalIndexService
type GetHistoricalOpenInterestResponse ¶
type GetHistoricalOpenInterestResponse struct {
Result []HistoricalOpenInterest `json:"result"`
// contains filtered or unexported fields
}
type GetHistoricalOpenInterestService ¶
type GetHistoricalOpenInterestService struct {
// contains filtered or unexported fields
}
func (*GetHistoricalOpenInterestService) Do ¶
func (s *GetHistoricalOpenInterestService) Do(ctx context.Context) ([]HistoricalOpenInterest, error)
func (*GetHistoricalOpenInterestService) EndTime ¶
func (s *GetHistoricalOpenInterestService) EndTime(endTime int64) *GetHistoricalOpenInterestService
func (*GetHistoricalOpenInterestService) StartTime ¶
func (s *GetHistoricalOpenInterestService) StartTime(startTime int64) *GetHistoricalOpenInterestService
type GetHistoricalOptionVolumeResponse ¶
type GetHistoricalOptionVolumeResponse struct {
Result []Historical24HVolume `json:"result"`
// contains filtered or unexported fields
}
type GetHistoricalPricesService ¶
type GetHistoricalPricesService struct {
// contains filtered or unexported fields
}
func (*GetHistoricalPricesService) Do ¶
func (s *GetHistoricalPricesService) Do(ctx context.Context) ([]HistoricalPrice, error)
func (*GetHistoricalPricesService) EndTime ¶
func (s *GetHistoricalPricesService) EndTime(endTime int64) *GetHistoricalPricesService
func (*GetHistoricalPricesService) MarketName ¶
func (s *GetHistoricalPricesService) MarketName(marketName string) *GetHistoricalPricesService
func (*GetHistoricalPricesService) Resolution ¶
func (s *GetHistoricalPricesService) Resolution(resolution int64) *GetHistoricalPricesService
func (*GetHistoricalPricesService) StartTime ¶
func (s *GetHistoricalPricesService) StartTime(startTime int64) *GetHistoricalPricesService
type GetLendingHistoryResponse ¶
type GetLendingHistoryResponse struct {
Result []LendingHistory `json:"result"`
// contains filtered or unexported fields
}
type GetLendingHistoryService ¶
type GetLendingHistoryService struct {
// contains filtered or unexported fields
}
func (*GetLendingHistoryService) Do ¶
func (s *GetLendingHistoryService) Do(ctx context.Context) ([]LendingHistory, error)
func (*GetLendingHistoryService) EndTime ¶
func (s *GetLendingHistoryService) EndTime(endTime int64) *GetLendingHistoryService
func (*GetLendingHistoryService) StartTime ¶
func (s *GetLendingHistoryService) StartTime(startTime int64) *GetLendingHistoryService
type GetLendingInfoResponse ¶
type GetLendingInfoResponse struct {
Result []LendingInfo `json:"result"`
// contains filtered or unexported fields
}
type GetLendingInfoService ¶
type GetLendingInfoService struct {
// contains filtered or unexported fields
}
func (*GetLendingInfoService) Do ¶
func (s *GetLendingInfoService) Do(ctx context.Context) ([]LendingInfo, error)
type GetLendingOffersResponse ¶
type GetLendingOffersResponse struct {
Result []LendingOffer `json:"result"`
// contains filtered or unexported fields
}
type GetLendingOffersService ¶
type GetLendingOffersService struct {
// contains filtered or unexported fields
}
func (*GetLendingOffersService) Do ¶
func (s *GetLendingOffersService) Do(ctx context.Context) ([]LendingOffer, error)
type GetLendingRatesResponse ¶
type GetLendingRatesResponse struct {
Result []LendingRate `json:"result"`
// contains filtered or unexported fields
}
type GetLendingRatesService ¶
type GetLendingRatesService struct {
// contains filtered or unexported fields
}
func (*GetLendingRatesService) Do ¶
func (s *GetLendingRatesService) Do(ctx context.Context) ([]LendingRate, error)
type GetLeveragedTokenBalancesResponse ¶
type GetLeveragedTokenBalancesResponse struct {
Result []LeveragedTokenBalance `json:"result"`
// contains filtered or unexported fields
}
type GetLeveragedTokenBalancesService ¶
type GetLeveragedTokenBalancesService struct {
// contains filtered or unexported fields
}
func (*GetLeveragedTokenBalancesService) Do ¶
func (s *GetLeveragedTokenBalancesService) Do(ctx context.Context) ([]LeveragedTokenBalance, error)
type GetLeveragedTokenInfoResponse ¶
type GetLeveragedTokenInfoResponse struct {
Result *LeveragedToken `json:"result"`
// contains filtered or unexported fields
}
type GetLeveragedTokenInfoService ¶
type GetLeveragedTokenInfoService struct {
// contains filtered or unexported fields
}
func (*GetLeveragedTokenInfoService) Do ¶
func (s *GetLeveragedTokenInfoService) Do(ctx context.Context) (*LeveragedToken, error)
func (*GetLeveragedTokenInfoService) Token ¶
func (s *GetLeveragedTokenInfoService) Token(token string) *GetLeveragedTokenInfoService
type GetListFutureService ¶
type GetListFutureService struct {
// contains filtered or unexported fields
}
type GetMarketInfoResponse ¶
type GetMarketInfoResponse struct {
Result []CoinSpotMarginInfo `json:"result"`
// contains filtered or unexported fields
}
type GetMarketsService ¶
type GetMarketsService struct {
// contains filtered or unexported fields
}
type GetMyBorrowHistoryResponse ¶
type GetMyBorrowHistoryResponse struct {
Result []BorrowHistory `json:"result"`
// contains filtered or unexported fields
}
type GetMyBorrowHistoryService ¶
type GetMyBorrowHistoryService struct {
// contains filtered or unexported fields
}
func (*GetMyBorrowHistoryService) Do ¶
func (s *GetMyBorrowHistoryService) Do(ctx context.Context) ([]BorrowHistory, error)
func (*GetMyBorrowHistoryService) EndTime ¶
func (s *GetMyBorrowHistoryService) EndTime(endTime int64) *GetMyBorrowHistoryService
func (*GetMyBorrowHistoryService) StartTime ¶
func (s *GetMyBorrowHistoryService) StartTime(startTime int64) *GetMyBorrowHistoryService
type GetMyLendingHistoryResponse ¶
type GetMyLendingHistoryResponse struct {
Result []UserLendingHistory `json:"result"`
// contains filtered or unexported fields
}
type GetMyLendingHistoryService ¶
type GetMyLendingHistoryService struct {
// contains filtered or unexported fields
}
func (*GetMyLendingHistoryService) Do ¶
func (s *GetMyLendingHistoryService) Do(ctx context.Context) ([]UserLendingHistory, error)
func (*GetMyLendingHistoryService) EndTime ¶
func (s *GetMyLendingHistoryService) EndTime(endTime int64) *GetMyLendingHistoryService
func (*GetMyLendingHistoryService) StartTime ¶
func (s *GetMyLendingHistoryService) StartTime(startTime int64) *GetMyLendingHistoryService
type GetMyQuotesResponse ¶
type GetMyQuotesResponse struct {
Result []OptionQuote `json:"result"`
// contains filtered or unexported fields
}
type GetMyQuotesService ¶
type GetMyQuotesService struct {
// contains filtered or unexported fields
}
func (*GetMyQuotesService) Do ¶
func (s *GetMyQuotesService) Do(ctx context.Context) ([]OptionQuote, error)
type GetOpenOrdersService ¶
type GetOpenOrdersService struct {
// contains filtered or unexported fields
}
func (*GetOpenOrdersService) Do ¶
func (s *GetOpenOrdersService) Do(ctx context.Context) ([]Order, error)
func (*GetOpenOrdersService) Market ¶
func (s *GetOpenOrdersService) Market(market string) *GetOpenOrdersService
type GetOpenTriggerOrdersService ¶
type GetOpenTriggerOrdersService struct {
// contains filtered or unexported fields
}
func (*GetOpenTriggerOrdersService) Do ¶
func (s *GetOpenTriggerOrdersService) Do(ctx context.Context) ([]Order, error)
func (*GetOpenTriggerOrdersService) Market ¶
func (s *GetOpenTriggerOrdersService) Market(market string) *GetOpenTriggerOrdersService
func (*GetOpenTriggerOrdersService) TriggerType ¶
func (s *GetOpenTriggerOrdersService) TriggerType(triggerType TriggerType) *GetOpenTriggerOrdersService
type GetOptionOpenInterestResponse ¶
type GetOptionOpenInterestResponse struct {
Result *OptionOpenInterest `json:"result"`
// contains filtered or unexported fields
}
type GetOptionOpenInterestService ¶
type GetOptionOpenInterestService struct {
// contains filtered or unexported fields
}
func (*GetOptionOpenInterestService) Do ¶
func (s *GetOptionOpenInterestService) Do(ctx context.Context) (*OptionOpenInterest, error)
type GetOptionsFillsResponse ¶
type GetOptionsFillsResponse struct {
Result []OptionFill `json:"result"`
// contains filtered or unexported fields
}
type GetOptionsFillsService ¶
type GetOptionsFillsService struct {
// contains filtered or unexported fields
}
func (*GetOptionsFillsService) Do ¶
func (s *GetOptionsFillsService) Do(ctx context.Context) ([]OptionFill, error)
func (*GetOptionsFillsService) EndTime ¶
func (s *GetOptionsFillsService) EndTime(endTime int64) *GetOptionsFillsService
func (*GetOptionsFillsService) StartTime ¶
func (s *GetOptionsFillsService) StartTime(startTime int64) *GetOptionsFillsService
type GetOptionsPositionsResponse ¶
type GetOptionsPositionsResponse struct {
Result []OptionPosition `json:"result"`
// contains filtered or unexported fields
}
type GetOptionsPositionsService ¶
type GetOptionsPositionsService struct {
// contains filtered or unexported fields
}
func (*GetOptionsPositionsService) Do ¶
func (s *GetOptionsPositionsService) Do(ctx context.Context) ([]OptionPosition, error)
type GetOrderBookService ¶
type GetOrderBookService struct {
// contains filtered or unexported fields
}
func (*GetOrderBookService) Depth ¶
func (s *GetOrderBookService) Depth(depth int) *GetOrderBookService
func (*GetOrderBookService) Do ¶
func (s *GetOrderBookService) Do(ctx context.Context) (OrderBook, error)
func (*GetOrderBookService) MarketName ¶
func (s *GetOrderBookService) MarketName(marketName string) *GetOrderBookService
type GetOrderHistoryService ¶
type GetOrderHistoryService struct {
// contains filtered or unexported fields
}
func (*GetOrderHistoryService) EndTime ¶
func (s *GetOrderHistoryService) EndTime(endTime int64) *GetOrderHistoryService
func (*GetOrderHistoryService) Market ¶
func (s *GetOrderHistoryService) Market(market string) *GetOrderHistoryService
func (*GetOrderHistoryService) StartTime ¶
func (s *GetOrderHistoryService) StartTime(startTime int64) *GetOrderHistoryService
type GetOrderStatusByClientIDResponse ¶
type GetOrderStatusByClientIDResponse struct {
Result *Order `json:"result"`
// contains filtered or unexported fields
}
type GetOrderStatusByClientIDService ¶
type GetOrderStatusByClientIDService struct {
// contains filtered or unexported fields
}
func (*GetOrderStatusByClientIDService) ClientID ¶
func (s *GetOrderStatusByClientIDService) ClientID(clientID string) *GetOrderStatusByClientIDService
type GetOrderStatusResponse ¶
type GetOrderStatusResponse struct {
Result *Order `json:"result"`
// contains filtered or unexported fields
}
type GetOrderStatusService ¶
type GetOrderStatusService struct {
// contains filtered or unexported fields
}
func (*GetOrderStatusService) Do ¶
func (s *GetOrderStatusService) Do(ctx context.Context) (*Order, error)
func (*GetOrderStatusService) OrderID ¶
func (s *GetOrderStatusService) OrderID(orderID int64) *GetOrderStatusService
type GetPositionsService ¶
type GetPositionsService struct {
// contains filtered or unexported fields
}
func (*GetPositionsService) Do ¶
func (s *GetPositionsService) Do(ctx context.Context) ([]Position, error)
func (*GetPositionsService) ShowAvgPrice ¶
func (s *GetPositionsService) ShowAvgPrice(sap bool) *GetPositionsService
type GetPublicOptionsTradesResponse ¶
type GetPublicOptionsTradesResponse struct {
Result []PublicOptionTrade `json:"result"`
// contains filtered or unexported fields
}
type GetPublicOptionsTradesService ¶
type GetPublicOptionsTradesService struct {
// contains filtered or unexported fields
}
func (*GetPublicOptionsTradesService) Do ¶
func (s *GetPublicOptionsTradesService) Do(ctx context.Context) ([]PublicOptionTrade, error)
func (*GetPublicOptionsTradesService) EndTime ¶
func (s *GetPublicOptionsTradesService) EndTime(endTime int64) *GetPublicOptionsTradesService
func (*GetPublicOptionsTradesService) StartTime ¶
func (s *GetPublicOptionsTradesService) StartTime(startTime int64) *GetPublicOptionsTradesService
type GetQuotesForYourQuoteRequestResponse ¶
type GetQuotesForYourQuoteRequestResponse struct {
Result []YourQuoteRequest `json:"result"`
// contains filtered or unexported fields
}
type GetQuotesForYourQuoteRequestService ¶
type GetQuotesForYourQuoteRequestService struct {
// contains filtered or unexported fields
}
func (*GetQuotesForYourQuoteRequestService) Do ¶
func (s *GetQuotesForYourQuoteRequestService) Do(ctx context.Context) ([]YourQuoteRequest, error)
func (*GetQuotesForYourQuoteRequestService) RequestID ¶
func (s *GetQuotesForYourQuoteRequestService) RequestID(requestID int64) *GetQuotesForYourQuoteRequestService
type GetSaveAddressesService ¶
type GetSaveAddressesService struct {
// contains filtered or unexported fields
}
func (*GetSaveAddressesService) Do ¶
func (s *GetSaveAddressesService) Do(ctx context.Context) ([]SaveAddress, error)
type GetSingleMarketService ¶
type GetSingleMarketService struct {
// contains filtered or unexported fields
}
func (*GetSingleMarketService) Do ¶
func (s *GetSingleMarketService) Do(ctx context.Context) (*Market, error)
func (*GetSingleMarketService) MarketName ¶
func (s *GetSingleMarketService) MarketName(marketName string) *GetSingleMarketService
type GetSpotMarginMarketInfoService ¶
type GetSpotMarginMarketInfoService struct {
// contains filtered or unexported fields
}
func (*GetSpotMarginMarketInfoService) Do ¶
func (s *GetSpotMarginMarketInfoService) Do(ctx context.Context) ([]CoinSpotMarginInfo, error)
func (*GetSpotMarginMarketInfoService) Market ¶
func (s *GetSpotMarginMarketInfoService) Market(market string) *GetSpotMarginMarketInfoService
type GetSubAccountBalanceResponse ¶
type GetSubAccountBalanceResponse struct {
Result []Balance `json:"result"`
// contains filtered or unexported fields
}
type GetSubAccountBalanceService ¶
type GetSubAccountBalanceService struct {
// contains filtered or unexported fields
}
func (*GetSubAccountBalanceService) Do ¶
func (s *GetSubAccountBalanceService) Do(ctx context.Context) ([]Balance, error)
func (*GetSubAccountBalanceService) NickName ¶
func (s *GetSubAccountBalanceService) NickName(nickName string) *GetSubAccountBalanceService
type GetTradesService ¶
type GetTradesService struct {
// contains filtered or unexported fields
}
func (*GetTradesService) EndTime ¶
func (s *GetTradesService) EndTime(endTime int64) *GetTradesService
func (*GetTradesService) MarketName ¶
func (s *GetTradesService) MarketName(marketName string) *GetTradesService
func (*GetTradesService) StartTime ¶
func (s *GetTradesService) StartTime(startTime int64) *GetTradesService
type GetTriggerOrderHistoryService ¶
type GetTriggerOrderHistoryService struct {
// contains filtered or unexported fields
}
func (*GetTriggerOrderHistoryService) Do ¶
func (s *GetTriggerOrderHistoryService) Do(ctx context.Context) ([]TriggerOrder, bool, error)
func (*GetTriggerOrderHistoryService) EndTime ¶
func (s *GetTriggerOrderHistoryService) EndTime(endTime int64) *GetTriggerOrderHistoryService
func (*GetTriggerOrderHistoryService) Market ¶
func (s *GetTriggerOrderHistoryService) Market(market string) *GetTriggerOrderHistoryService
func (*GetTriggerOrderHistoryService) OrderType ¶
func (s *GetTriggerOrderHistoryService) OrderType(orderType OrderType) *GetTriggerOrderHistoryService
func (*GetTriggerOrderHistoryService) Side ¶
func (s *GetTriggerOrderHistoryService) Side(orderSide Side) *GetTriggerOrderHistoryService
func (*GetTriggerOrderHistoryService) StartTime ¶
func (s *GetTriggerOrderHistoryService) StartTime(startTime int64) *GetTriggerOrderHistoryService
func (*GetTriggerOrderHistoryService) TriggerType ¶
func (s *GetTriggerOrderHistoryService) TriggerType(triggerType TriggerType) *GetTriggerOrderHistoryService
type GetTriggerOrderTriggersService ¶
type GetTriggerOrderTriggersService struct {
// contains filtered or unexported fields
}
func (*GetTriggerOrderTriggersService) Do ¶
func (s *GetTriggerOrderTriggersService) Do(ctx context.Context) ([]OrderTrigger, error)
type GetWithdrawHistoryService ¶
type GetWithdrawHistoryService struct {
// contains filtered or unexported fields
}
func (*GetWithdrawHistoryService) Do ¶
func (s *GetWithdrawHistoryService) Do(ctx context.Context) ([]Withdraw, error)
func (*GetWithdrawHistoryService) EndTime ¶
func (s *GetWithdrawHistoryService) EndTime(endTime int64) *GetWithdrawHistoryService
func (*GetWithdrawHistoryService) StartTime ¶
func (s *GetWithdrawHistoryService) StartTime(startTime int64) *GetWithdrawHistoryService
type GetWithdrawalFeesService ¶
type GetWithdrawalFeesService struct {
// contains filtered or unexported fields
}
func (*GetWithdrawalFeesService) Address ¶
func (s *GetWithdrawalFeesService) Address(address string) *GetWithdrawalFeesService
func (*GetWithdrawalFeesService) Coin ¶
func (s *GetWithdrawalFeesService) Coin(coin string) *GetWithdrawalFeesService
func (*GetWithdrawalFeesService) Do ¶
func (s *GetWithdrawalFeesService) Do(ctx context.Context) (*WithdrawalFee, error)
func (*GetWithdrawalFeesService) Size ¶
func (s *GetWithdrawalFeesService) Size(size float64) *GetWithdrawalFeesService
func (*GetWithdrawalFeesService) Tag ¶
func (s *GetWithdrawalFeesService) Tag(tag string) *GetWithdrawalFeesService
type Historical24HVolume ¶
type HistoricalIndex ¶
type HistoricalIndexResponse ¶
type HistoricalIndexResponse struct {
Result []HistoricalIndex `json:"result"`
// contains filtered or unexported fields
}
type HistoricalOpenInterest ¶
type HistoricalPrice ¶
type HistoricalPricesResponse ¶
type HistoricalPricesResponse struct {
Result []HistoricalPrice `json:"result"`
// contains filtered or unexported fields
}
type LendingHistory ¶
type LendingInfo ¶
type LendingOffer ¶
type LendingRate ¶
type LeverageParams ¶
type LeverageParams struct {
Leverage float64 `json:"leverage"`
}
type LeveragedToken ¶
type LeveragedToken struct {
Name string `json:"name"`
Description string `json:"description"`
Underlying string `json:"underlying"`
Leverage int `json:"leverage"`
Outstanding float64 `json:"outstanding"`
Basket Basket `json:"basket"`
TargetComponents []string `json:"targetComponents"`
UnderlyingMark float64 `json:"underlyingMark"`
TotalCollateral float64 `json:"totalCollateral"`
ContractAddress string `json:"contractAddress"`
CurrentLeverage float64 `json:"currentLeverage"`
Change1H float64 `json:"change1h"`
Change24H float64 `json:"change24h"`
ChangeBod float64 `json:"changeBod"`
}
type LeveragedTokenBalance ¶
type LeveragedTokenCreationRequest ¶
type LeveragedTokenCreationRequest struct {
ID int64 `json:"id"`
Token string `json:"token"`
RequestedSize float64 `json:"requestedSize"`
Pending bool `json:"pending"`
CreatedSize float64 `json:"createdSize"`
Price float64 `json:"price"`
Cost float64 `json:"cost"`
Fee float64 `json:"fee"`
RequestedAt time.Time `json:"requestedAt"`
FulfilledAt time.Time `json:"fulfilledAt"`
}
type LeveragedTokenRedemptionRequest ¶
type LeveragedTokenRedemptionRequest struct {
ID int64 `json:"id"`
Token string `json:"token"`
Size float64 `json:"size"`
Pending bool `json:"pending"`
Price float64 `json:"price"`
Proceeds float64 `json:"proceeds"`
Fee float64 `json:"fee"`
RequestedAt time.Time `json:"requestedAt"`
FulfilledAt time.Time `json:"fulfilledAt"`
}
type ListFutureResponse ¶
type ListFutureResponse struct {
Result []Future `json:"result"`
// contains filtered or unexported fields
}
type ListLeveragedTokenCreationRequestsResponse ¶
type ListLeveragedTokenCreationRequestsResponse struct {
Result []LeveragedTokenCreationRequest `json:"result"`
// contains filtered or unexported fields
}
type ListLeveragedTokenCreationRequestsService ¶
type ListLeveragedTokenCreationRequestsService struct {
// contains filtered or unexported fields
}
func (*ListLeveragedTokenCreationRequestsService) Do ¶
func (s *ListLeveragedTokenCreationRequestsService) Do(ctx context.Context) ([]LeveragedTokenCreationRequest, error)
type ListLeveragedTokenRedemptionRequestsResponse ¶
type ListLeveragedTokenRedemptionRequestsResponse struct {
Result []LeveragedTokenCreationRequest `json:"result"`
// contains filtered or unexported fields
}
type ListLeveragedTokenRedemptionRequestsService ¶
type ListLeveragedTokenRedemptionRequestsService struct {
// contains filtered or unexported fields
}
func (*ListLeveragedTokenRedemptionRequestsService) Do ¶
func (s *ListLeveragedTokenRedemptionRequestsService) Do(ctx context.Context) ([]LeveragedTokenCreationRequest, error)
type ListLeveragedTokensResponse ¶
type ListLeveragedTokensResponse struct {
Result []LeveragedToken `json:"result"`
// contains filtered or unexported fields
}
type ListLeveragedTokensService ¶
type ListLeveragedTokensService struct {
// contains filtered or unexported fields
}
func (*ListLeveragedTokensService) Do ¶
func (s *ListLeveragedTokensService) Do(ctx context.Context) ([]LeveragedToken, error)
type ListQuoteRequestsResponse ¶
type ListQuoteRequestsResponse struct {
Result []QuoteRequest `json:"result"`
// contains filtered or unexported fields
}
type ListQuoteRequestsService ¶
type ListQuoteRequestsService struct {
// contains filtered or unexported fields
}
func (*ListQuoteRequestsService) Do ¶
func (s *ListQuoteRequestsService) Do(ctx context.Context) ([]QuoteRequest, error)
type Market ¶
type Market struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
PostOnly bool `json:"postOnly"`
PriceIncrement float64 `json:"priceIncrement"`
SizeIncrement float64 `json:"sizeIncrement"`
MinProvideSize float64 `json:"minProvideSize"`
Last float64 `json:"last"`
Bid float64 `json:"bid"`
Ask float64 `json:"ask"`
Price float64 `json:"price"`
Type MarketType `json:"type"`
FutureType *string `json:"futureType"`
BaseCurrency *string `json:"baseCurrency"`
IsEtfMarket bool `json:"isEtfMarket"`
QuoteCurrency *string `json:"quoteCurrency"`
Underlying *string `json:"underlying"`
Restricted bool `json:"restricted"`
HighLeverageFeeExempt bool `json:"highLeverageFeeExempt"`
LargeOrderThreshold float64 `json:"largeOrderThreshold"`
Change1H float64 `json:"change1h"`
Change24H float64 `json:"change24h"`
ChangeBod float64 `json:"changeBod"`
QuoteVolume24H float64 `json:"quoteVolume24h"`
VolumeUsd24H float64 `json:"volumeUsd24h"`
PriceHigh24H float64 `json:"priceHigh24h"`
PriceLow24H float64 `json:"priceLow24h"`
}
type MarketType ¶ added in v1.0.4
type MarketType string
const ( SpotMarket MarketType = "spot" FutureMarket MarketType = "future" )
type MarketsResponse ¶
type MarketsResponse struct {
Result []Market `json:"result"`
// contains filtered or unexported fields
}
type ModifyOrderByClientIDResponse ¶
type ModifyOrderByClientIDResponse struct {
Result *Order `json:"result"`
// contains filtered or unexported fields
}
type ModifyOrderByClientIDService ¶
type ModifyOrderByClientIDService struct {
// contains filtered or unexported fields
}
func (*ModifyOrderByClientIDService) ClientID ¶
func (s *ModifyOrderByClientIDService) ClientID(clientID string) *ModifyOrderByClientIDService
func (*ModifyOrderByClientIDService) Do ¶
func (s *ModifyOrderByClientIDService) Do(ctx context.Context) (*Order, error)
func (*ModifyOrderByClientIDService) Params ¶
func (s *ModifyOrderByClientIDService) Params(params ModifyOrderByClientIDParams) *ModifyOrderByClientIDService
type ModifyOrderParams ¶
type ModifyOrderResponse ¶
type ModifyOrderResponse struct {
Result *Order `json:"result"`
// contains filtered or unexported fields
}
type ModifyOrderService ¶
type ModifyOrderService struct {
// contains filtered or unexported fields
}
func (*ModifyOrderService) Do ¶
func (s *ModifyOrderService) Do(ctx context.Context) (*Order, error)
func (*ModifyOrderService) OrderID ¶
func (s *ModifyOrderService) OrderID(orderID int64) *ModifyOrderService
func (*ModifyOrderService) Params ¶
func (s *ModifyOrderService) Params(params ModifyOrderParams) *ModifyOrderService
type ModifyTriggerOrderResponse ¶
type ModifyTriggerOrderResponse struct {
Result *TriggerOrder `json:"result"`
// contains filtered or unexported fields
}
type ModifyTriggerOrderService ¶
type ModifyTriggerOrderService struct {
// contains filtered or unexported fields
}
func (*ModifyTriggerOrderService) Do ¶
func (s *ModifyTriggerOrderService) Do(ctx context.Context) (*TriggerOrder, error)
func (*ModifyTriggerOrderService) OrderID ¶
func (s *ModifyTriggerOrderService) OrderID(orderID int64) *ModifyTriggerOrderService
func (*ModifyTriggerOrderService) Params ¶
func (s *ModifyTriggerOrderService) Params(params ModifyTriggerOrderParams) *ModifyTriggerOrderService
type OpenTriggerOrdersResponse ¶
type OpenTriggerOrdersResponse struct {
Result []Order `json:"result"`
// contains filtered or unexported fields
}
type Option ¶
type Option struct {
Underlying string `json:"underlying"`
Type OptionType `json:"type"`
Strike float64 `json:"strike"`
Expiry time.Time `json:"expiry"`
}
type OptionFill ¶
type OptionFill struct {
Fee float64 `json:"fee"`
FeeRate float64 `json:"feeRate"`
ID int64 `json:"id"`
Liquidity string `json:"liquidity"`
Option Option `json:"option"`
Price float64 `json:"price"`
QuoteID float64 `json:"quoteId"`
Side string `json:"side"`
Size float64 `json:"size"`
Time time.Time `json:"time"`
}
type OptionOpenInterest ¶
type OptionOpenInterest struct {
OpenInterest float64 `json:"openInterest"`
}
type OptionPosition ¶
type OptionPosition struct {
EntryPrice float64 `json:"entryPrice"`
NetSize float64 `json:"netSize"`
Option Option `json:"option"`
Side Side `json:"side"`
Size float64 `json:"size"`
PessimisticValuation *float64 `json:"pessimisticValuation"`
PessimisticIndexPrice *float64 `json:"pessimisticIndexPrice"`
PessimisticVol *float64 `json:"pessimisticVol"`
}
type OptionQuote ¶
type OptionQuote struct {
Collateral float64 `json:"collateral"`
ID int64 `json:"id"`
Option Option `json:"option"`
Price float64 `json:"price"`
QuoteExpiry *string `json:"quoteExpiry"`
QuoterSide Side `json:"quoterSide"`
RequestID int64 `json:"requestId"`
RequestSide Side `json:"requestSide"`
Size float64 `json:"size"`
Status OptionQuoteStatus `json:"status"`
Time time.Time `json:"time"`
}
type OptionQuoteStatus ¶
type OptionQuoteStatus string
const ( OptionQuoteStatusOpen OptionQuoteStatus = "open" OptionQuoteStatusFilled OptionQuoteStatus = "filled" OptionQuoteStatusCancelled OptionQuoteStatus = "cancelled" )
type OptionType ¶
type OptionType string
const ( OptionTypeCall OptionType = "call" OptionTypePut OptionType = "put" )
type OptionVolume24H ¶
type Order ¶
type Order struct {
CreatedAt time.Time `json:"createdAt"`
FilledSize float64 `json:"filledSize"`
Future string `json:"future"`
ID int64 `json:"id"`
Market string `json:"market"`
Price float64 `json:"price"`
AvgFillPrice float64 `json:"avgFillPrice"`
RemainingSize float64 `json:"remainingSize"`
Side Side `json:"side"`
Size float64 `json:"size"`
Status OrderStatus `json:"status"`
Type OrderType `json:"type"`
ReduceOnly bool `json:"reduceOnly"`
Ioc bool `json:"ioc"`
PostOnly bool `json:"postOnly"`
ClientID *string `json:"clientId"`
}
type OrderBookResponse ¶
type OrderBookResponse struct {
Result OrderBook `json:"result"`
// contains filtered or unexported fields
}
type OrderHistoryResponse ¶
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusNew OrderStatus = "new" OrderStatusOpen OrderStatus = "open" OrderStatusFilled OrderStatus = "filled" OrderStatusCancelled OrderStatus = "cancelled" OrderStatusClosed OrderStatus = "closed" OrderStatusTriggered OrderStatus = "triggered" )
type OrderTrigger ¶
type OrdersResponse ¶
type OrdersResponse struct {
Result []Order `json:"result"`
// contains filtered or unexported fields
}
type PlaceOrderParams ¶
type PlaceOrderParams struct {
Market string `json:"market"`
Side Side `json:"side"`
Price float64 `json:"price"`
Type OrderType `json:"type"`
Size float64 `json:"size"`
ReduceOnly *bool `json:"reduceOnly,omitempty"`
Ioc *bool `json:"ioc,omitempty"`
PostOnly *bool `json:"postOnly,omitempty"`
ClientID *string `json:"clientId,omitempty"`
RejectOnPriceBand *bool `json:"rejectOnPriceBand,omitempty"`
}
type PlaceOrderResponse ¶
type PlaceOrderResponse struct {
Result *Order `json:"result"`
// contains filtered or unexported fields
}
type PlaceOrderService ¶
type PlaceOrderService struct {
// contains filtered or unexported fields
}
func (*PlaceOrderService) Params ¶
func (s *PlaceOrderService) Params(params PlaceOrderParams) *PlaceOrderService
type PlaceTriggerOrderParams ¶
type PlaceTriggerOrderParams struct {
Market string `json:"market"`
Side Side `json:"side"`
Size float64 `json:"size"`
Type TriggerType `json:"type"`
TrailValue *float64 `json:"trailValue,omitempty"`
TriggerPrice *float64 `json:"triggerPrice,omitempty"`
OrderPrice *float64 `json:"orderPrice,omitempty"`
ReduceOnly *bool `json:"reduceOnly,omitempty"`
RetryUntilFilled *bool `json:"retryUntilFilled,omitempty"`
}
type PlaceTriggerOrderResponse ¶
type PlaceTriggerOrderResponse struct {
Result *TriggerOrder `json:"result"`
// contains filtered or unexported fields
}
type PlaceTriggerOrderService ¶
type PlaceTriggerOrderService struct {
// contains filtered or unexported fields
}
func (*PlaceTriggerOrderService) Do ¶
func (s *PlaceTriggerOrderService) Do(ctx context.Context) (*TriggerOrder, error)
func (*PlaceTriggerOrderService) Params ¶
func (s *PlaceTriggerOrderService) Params(params PlaceTriggerOrderParams) *PlaceTriggerOrderService
type Position ¶
type Position struct {
Cost float64 `json:"cost"`
CumulativeBuySize float64 `json:"cumulativeBuySize"`
CumulativeSellSize float64 `json:"cumulativeSellSize"`
EntryPrice float64 `json:"entryPrice"`
EstimatedLiquidationPrice float64 `json:"estimatedLiquidationPrice"`
Future string `json:"future"`
InitialMarginRequirement float64 `json:"initialMarginRequirement"`
LongOrderSize float64 `json:"longOrderSize"`
MaintenanceMarginRequirement float64 `json:"maintenanceMarginRequirement"`
NetSize float64 `json:"netSize"`
OpenSize float64 `json:"openSize"`
RealizedPnl float64 `json:"realizedPnl"`
RecentAverageOpenPrice float64 `json:"recentAverageOpenPrice"`
RecentBreakEvenPrice float64 `json:"recentBreakEvenPrice"`
RecentPnl float64 `json:"recentPnl"`
ShortOrderSize float64 `json:"shortOrderSize"`
Side string `json:"side"`
Size float64 `json:"size"`
UnrealizedPnl float64 `json:"unrealizedPnl"`
CollateralUsed float64 `json:"collateralUsed"`
}
type PositionsPerShare ¶
type PositionsResponse ¶
type PositionsResponse struct {
Result []Position `json:"result"`
// contains filtered or unexported fields
}
type PublicOptionTrade ¶
type QuoteRequest ¶
type QuotesForYourQuoteRequest ¶
type QuotesForYourQuoteRequest struct {
Collateral float64 `json:"collateral"`
ID int64 `json:"id"` // quote id
Option Option `json:"option"`
Price float64 `json:"price"`
QuoteExpiry *string `json:"quoteExpiry"`
QuoterSide Side `json:"quoterSide"`
RequestID int64 `json:"requestId"` // quote request id
RequestSide Side `json:"requestSide"`
Size float64 `json:"size"`
Status OptionQuoteStatus `json:"status"`
Time time.Time `json:"time"`
}
type RequestETFRebalanceInfoResponse ¶
type RequestETFRebalanceInfoResponse struct {
Result map[string]ETFRebalanceInfo `json:"result"`
// contains filtered or unexported fields
}
type RequestETFRebalanceInfoService ¶
type RequestETFRebalanceInfoService struct {
// contains filtered or unexported fields
}
func (*RequestETFRebalanceInfoService) Do ¶
func (s *RequestETFRebalanceInfoService) Do(ctx context.Context) (map[string]ETFRebalanceInfo, error)
type RequestLeveragedTokenCreationParams ¶
type RequestLeveragedTokenCreationParams struct {
Size string `json:"size"`
}
type RequestLeveragedTokenCreationResponse ¶
type RequestLeveragedTokenCreationResponse struct {
Result *RequestLeveragedTokenCreation `json:"result"`
// contains filtered or unexported fields
}
type RequestLeveragedTokenCreationService ¶
type RequestLeveragedTokenCreationService struct {
// contains filtered or unexported fields
}
func (*RequestLeveragedTokenCreationService) Do ¶
func (s *RequestLeveragedTokenCreationService) Do(ctx context.Context) (*RequestLeveragedTokenCreation, error)
func (*RequestLeveragedTokenCreationService) Params ¶
func (s *RequestLeveragedTokenCreationService) Params(params RequestLeveragedTokenCreationParams) *RequestLeveragedTokenCreationService
type RequestLeveragedTokenRedemptionParams ¶
type RequestLeveragedTokenRedemptionParams struct {
Size string `json:"size"`
}
type RequestLeveragedTokenRedemptionResponse ¶
type RequestLeveragedTokenRedemptionResponse struct {
Result *RequestLeveragedTokenRedemption `json:"result"`
// contains filtered or unexported fields
}
type RequestLeveragedTokenRedemptionService ¶
type RequestLeveragedTokenRedemptionService struct {
// contains filtered or unexported fields
}
func (*RequestLeveragedTokenRedemptionService) Do ¶
func (s *RequestLeveragedTokenRedemptionService) Do(ctx context.Context) (*RequestLeveragedTokenRedemption, error)
type RequestMsg ¶
type RestClientOption ¶ added in v1.0.6
type RestClientOption func(c *Client)
func WithHTTPClient ¶ added in v1.0.6
func WithHTTPClient(hc *http.Client) RestClientOption
type SaveAddress ¶
type SaveAddress struct {
Address string `json:"address"`
Coin string `json:"coin"`
Fiat bool `json:"fiat"`
ID int64 `json:"id"`
IsPrimetrust bool `json:"isPrimetrust"`
LastUsedAt time.Time `json:"lastUsedAt"`
Name string `json:"name"`
Tag *string `json:"tag"`
Whitelisted *bool `json:"whitelisted"`
WhitelistedAfter *time.Time `json:"whitelistedAfter"`
}
type SaveAddressesResponse ¶
type SaveAddressesResponse struct {
Result []SaveAddress `json:"result"`
// contains filtered or unexported fields
}
type SingleMarketResponse ¶
type SingleMarketResponse struct {
Result *Market `json:"result"`
// contains filtered or unexported fields
}
type SubAccount ¶
type SubmitLendingOfferResponse ¶
type SubmitLendingOfferResponse struct {
Result interface{} `json:"result"`
// contains filtered or unexported fields
}
type SubmitLendingOfferService ¶
type SubmitLendingOfferService struct {
// contains filtered or unexported fields
}
func (*SubmitLendingOfferService) Do ¶
func (s *SubmitLendingOfferService) Do(ctx context.Context) (interface{}, error)
func (*SubmitLendingOfferService) Params ¶
func (s *SubmitLendingOfferService) Params(params SubmitLendingOfferParams) *SubmitLendingOfferService
type Subscription ¶
type TradesResponse ¶
type TradesResponse struct {
Result []Trade `json:"result"`
// contains filtered or unexported fields
}
type TransferBetweenSubAccountsResponse ¶
type TransferBetweenSubAccountsResponse struct {
Result *TransferBetweenSubAccounts `json:"result"`
// contains filtered or unexported fields
}
type TransferBetweenSubAccountsService ¶
type TransferBetweenSubAccountsService struct {
// contains filtered or unexported fields
}
func (*TransferBetweenSubAccountsService) Do ¶
func (s *TransferBetweenSubAccountsService) Do(ctx context.Context) (*TransferBetweenSubAccounts, error)
func (*TransferBetweenSubAccountsService) Params ¶
func (s *TransferBetweenSubAccountsService) Params(params TransferBetweenSubAccountsParams) *TransferBetweenSubAccountsService
type TriggerOrder ¶
type TriggerOrder struct {
CreatedAt time.Time `json:"createdAt"`
Future string `json:"future"`
ID int `json:"id"`
Market string `json:"market"`
OrderPrice *float64 `json:"orderPrice"`
ReduceOnly bool `json:"reduceOnly"`
Side Side `json:"side"`
Size float64 `json:"size"`
Status OrderStatus `json:"status"`
TrailStart *float64 `json:"trailStart"`
TrailValue *float64 `json:"trailValue"`
TriggerPrice float64 `json:"triggerPrice"`
TriggeredAt *string `json:"triggeredAt"`
Type TriggerType `json:"type"`
OrderType OrderType `json:"orderType"`
FilledSize float64 `json:"filledSize"`
AvgFillPrice *float64 `json:"avgFillPrice"`
RetryUntilFilled bool `json:"retryUntilFilled"`
}
type TriggerOrderHistoryResponse ¶
type TriggerOrderHistoryResponse struct {
Result []TriggerOrder `json:"result"`
HasMoreData bool `json:"hasMoreData"`
// contains filtered or unexported fields
}
type TriggerOrderTriggersResponse ¶
type TriggerOrderTriggersResponse struct {
Result []OrderTrigger `json:"result"`
// contains filtered or unexported fields
}
type TriggerType ¶
type TriggerType string
const ( TriggerTypeStop TriggerType = "stop" TriggerTypeTrailingStop TriggerType = "trailing_stop" TriggerTypeTakeProfit TriggerType = "take_profit" )
type UserLendingHistory ¶
type WebsocketService ¶
type WebsocketService struct {
// contains filtered or unexported fields
}
func NewWebsocketService ¶
func NewWebsocketService(apiKey, apiSecret string, autoReconnect bool) *WebsocketService
func (*WebsocketService) Close ¶
func (s *WebsocketService) Close()
func (*WebsocketService) Connect ¶
func (s *WebsocketService) Connect(dataHandler WsDataHandler, errHandler WsErrorHandler) error
func (*WebsocketService) ResetConnection ¶
func (s *WebsocketService) ResetConnection()
func (*WebsocketService) SubAccount ¶
func (s *WebsocketService) SubAccount(sa string) *WebsocketService
func (*WebsocketService) Subscribe ¶
func (s *WebsocketService) Subscribe(sub Subscription) error
func (*WebsocketService) Unsubscribe ¶
func (s *WebsocketService) Unsubscribe(sub Subscription) error
type WithdrawHistoryResponse ¶
type WithdrawHistoryResponse struct {
Result []Withdraw `json:"result"`
// contains filtered or unexported fields
}
type WithdrawParams ¶
type WithdrawResponse ¶
type WithdrawResponse struct {
Result *Withdraw `json:"result"`
// contains filtered or unexported fields
}
type WithdrawService ¶
type WithdrawService struct {
// contains filtered or unexported fields
}
func (*WithdrawService) Params ¶
func (s *WithdrawService) Params(params WithdrawParams) *WithdrawService
type WithdrawalFee ¶
type WithdrawalFeesResponse ¶
type WithdrawalFeesResponse struct {
Result *WithdrawalFee `json:"result"`
// contains filtered or unexported fields
}
type WsChannel ¶
type WsChannel string
const ( // public channels WsChannelTicker WsChannel = "ticker" WsChannelMarkets WsChannel = "markets" WsChannelTrades WsChannel = "trades" WsChannelOrderBook WsChannel = "orderbook" WsChannelOrderbookGrouped WsChannel = "orderbookGrouped" // private channels WsChannelFills WsChannel = "fills" WsChannelOrders WsChannel = "orders" WsChannelFTXPay WsChannel = "ftxpay" )
type WsDataAction ¶
type WsDataAction string
const ( PartialWsDataAction WsDataAction = "partial" UpdateWsDataAction WsDataAction = "update" )
type WsDataHandler ¶
type WsDataHandler func(res WsReponse)
type WsErrorHandler ¶
type WsErrorHandler func(err error)
type WsFTXPayEvent ¶
type WsFTXPayEvent struct {
Data WsFTXPay `json:"data"`
// contains filtered or unexported fields
}
type WsFills ¶
type WsFills struct {
BaseCurrency *string `json:"baseCurrency"`
Fee float64 `json:"fee"`
FeeCurrency string `json:"feeCurrency"`
FeeRate float64 `json:"feeRate"`
Future *string `json:"future"`
ID int64 `json:"id"`
Liquidity string `json:"liquidity"`
Market string `json:"market"`
OrderID int64 `json:"orderId"`
Price float64 `json:"price"`
QuoteCurrency string `json:"quoteCurrency"`
Side Side `json:"side"`
Size float64 `json:"size"`
Time time.Time `json:"time"`
TradeID int64 `json:"tradeId"`
Type string `json:"type"`
}
type WsFillsEvent ¶
type WsFillsEvent struct {
Data WsFills `json:"data"`
// contains filtered or unexported fields
}
type WsFuture ¶
type WsFuture struct {
Description string `json:"description"`
Enabled bool `json:"enabled"`
Expired bool `json:"expired"`
Expiry *time.Time `json:"expiry"`
ExpiryDescription string `json:"expiryDescription"`
Group string `json:"group"`
ImfFactor float64 `json:"imfFactor"`
MoveStart interface{} `json:"moveStart"`
Name string `json:"name"`
Perpetual bool `json:"perpetual"`
PositionLimitWeight float64 `json:"positionLimitWeight"`
PostOnly bool `json:"postOnly"`
Type string `json:"type"`
Underlying string `json:"underlying"`
UnderlyingDescription string `json:"underlyingDescription"`
}
type WsGroupedOrderBook ¶
type WsGroupedOrderBookEvent ¶
type WsGroupedOrderBookEvent struct {
Grouping float64 `json:"grouping"`
Data WsGroupedOrderBook `json:"data"`
// contains filtered or unexported fields
}
type WsMarket ¶
type WsMarket struct {
BaseCurrency *string `json:"baseCurrency"`
QuoteCurrency *string `json:"quoteCurrency"`
Enabled bool `json:"enabled"`
Future *WsFuture `json:"future"`
HighLeverageFeeExempt bool `json:"highLeverageFeeExempt"`
Name string `json:"name"`
PostOnly bool `json:"postOnly"`
PriceIncrement float64 `json:"priceIncrement"`
Restricted bool `json:"restricted"`
SizeIncrement float64 `json:"sizeIncrement"`
Type string `json:"type"`
Underlying *string `json:"underlying"`
}
type WsMarketsData ¶
type WsMarketsData struct {
Action WsDataAction `json:"action"`
Data map[string]WsMarket
}
type WsMarketsEvent ¶
type WsMarketsEvent struct {
Data WsMarketsData `json:"data"`
// contains filtered or unexported fields
}
type WsOrderBook ¶
type WsOrderBook struct {
Action WsDataAction `json:"action"`
Asks []Feed `json:"asks"`
Bids []Feed `json:"bids"`
Checksum int64 `json:"checksum"`
Time float64 `json:"time"`
}
type WsOrderBookEvent ¶
type WsOrderBookEvent struct {
Data WsOrderBook `json:"data"`
// contains filtered or unexported fields
}
type WsOrders ¶
type WsOrders struct {
AvgFillPrice float64 `json:"avgFillPrice"`
ClientID *string `json:"clientId"`
CreatedAt time.Time `json:"createdAt"`
FilledSize float64 `json:"filledSize"`
ID int64 `json:"id"`
Ioc bool `json:"ioc"`
Liquidation bool `json:"liquidation"`
Market string `json:"market"`
PostOnly bool `json:"postOnly"`
Price float64 `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
RemainingSize float64 `json:"remainingSize"`
Side Side `json:"side"`
Size float64 `json:"size"`
Status OrderStatus `json:"status"`
Type OrderType `json:"type"`
}
type WsOrdersEvent ¶
type WsOrdersEvent struct {
Data WsOrders `json:"data"`
// contains filtered or unexported fields
}
type WsReponse ¶
type WsReponse struct {
OrderBookEvent *WsOrderBookEvent
GroupedOrderBookEvent *WsGroupedOrderBookEvent
Ticker *WsTickerEvent
Markets *WsMarketsEvent
Trades *WsTradesEvent
Fills *WsFillsEvent
Orders *WsOrdersEvent
FTXPay *WsFTXPayEvent
}
type WsTickerEvent ¶
type WsTickerEvent struct {
Data WsTicker `json:"data"`
// contains filtered or unexported fields
}
type WsTradesEvent ¶
type WsTradesEvent struct {
Data []WsTrade `json:"data"`
// contains filtered or unexported fields
}
type YourQuoteRequest ¶
type YourQuoteRequest struct {
ID int64 `json:"id"`
Option Option `json:"option"`
Side Side `json:"side"`
Size float64 `json:"size"`
Time time.Time `json:"time"`
RequestExpiry time.Time `json:"requestExpiry"`
Status OptionQuoteStatus `json:"status"`
HideLimitPrice bool `json:"hideLimitPrice"`
LimitPrice float64 `json:"limitPrice"`
Quotes []YourQuote `json:"quotes"`
}
type YourQuoteRequestsResponse ¶
type YourQuoteRequestsResponse struct {
Result []YourQuoteRequest `json:"result"`
// contains filtered or unexported fields
}
type YourQuoteRequestsService ¶
type YourQuoteRequestsService struct {
// contains filtered or unexported fields
}
func (*YourQuoteRequestsService) Do ¶
func (s *YourQuoteRequestsService) Do(ctx context.Context) ([]YourQuoteRequest, error)
Source Files
¶
- account_change_account_leverage_service.go
- account_get_account_service.go
- account_get_positions_service.go
- client.go
- common.go
- fills_service.go
- funding_payments_service.go
- futures_get_expired_futures.go
- futures_get_future_funding_rate_service.go
- futures_get_future_service.go
- futures_get_future_stats_service.go
- futures_get_historical_index_service.go
- futures_get_index_weights_service.go
- futures_get_list_future_service.go
- helper.go
- lt_get_leveraged_token_balances_service.go
- lt_get_leveraged_token_info_service.go
- lt_list_leveraged_token_creation_requests_service.go
- lt_list_leveraged_token_redemption_requests_service.go
- lt_list_leveraged_tokens_service.go
- lt_request_etf_rebalance_info_service.go
- lt_request_leveraged_token_ redemption_service.go
- lt_request_leveraged_token_creation_service.go
- markets_get_historical_prices_service.go
- markets_get_markets_service.go
- markets_get_orderbook_service.go
- markets_get_single_market_service.go
- markets_get_trades_service.go
- options_accept_options_quote_service.go
- options_cancel_quote_request_service.go
- options_cancel_quote_service.go
- options_create_quote_request_service.go
- options_create_quote_service.go
- options_get_24h_option_volume_service.go
- options_get_account_options_info_service.go
- options_get_historical_open_interest_service.go
- options_get_historical_option_24h_volume_service.go
- options_get_my_quotes_service.go
- options_get_option_open_interest_service.go
- options_get_options_fills_service.go
- options_get_options_positions_service.go
- options_get_public_options_trades_service.go
- options_get_quotes_for_your_quote_request_service.go
- options_list_quote_requests_service.go
- options_your_quote_requests_service.go
- orders_cancel_all_order_service.go
- orders_cancel_order_by_client_id_service.go
- orders_cancel_order_service.go
- orders_cancel_trigger_order_service.go
- orders_get_open_orders_service.go
- orders_get_open_trigger_orders_service.go
- orders_get_order_history_service.go
- orders_get_order_status_by_client_id_service.go
- orders_get_order_status_service.go
- orders_get_trigger_order_history_service.go
- orders_get_trigger_order_triggers_service.go
- orders_modify_order_by_client_id_service.go
- orders_modify_order_service.go
- orders_modify_trigger_order_service.go
- orders_place_order_service.go
- orders_place_trigger_order_service.go
- request.go
- sm_get_borrow_rates_service.go
- sm_get_daily_borrowed_amounts_service.go
- sm_get_lending_history_service.go
- sm_get_lending_info_service.go
- sm_get_lending_offers_service.go
- sm_get_lending_rates_service.go
- sm_get_market_info.go
- sm_get_my_borrow_history_service.go
- sm_get_my_lending_history_service.go
- sm_submit_lending_offer_service.go
- subaccounts_change_subaccount_name_service.go
- subaccounts_create_subaccounts_service.go
- subaccounts_delete_subaccount_service.go
- subaccounts_get_all_subaccounts_service.go
- subaccounts_get_subaccount_balance_service.go
- subaccounts_transfer_between_subaccounts_service.go
- wallet_create_save_addresses_service.go
- wallet_delete_save_addresses_service.go
- wallet_get_airdrop_service.go
- wallet_get_all_balances_service.go
- wallet_get_balances_service.go
- wallet_get_coins_service.go
- wallet_get_deposit_address_list_service.go
- wallet_get_deposit_address_service.go
- wallet_get_deposit_history_service.go
- wallet_get_save_addresses_service.go
- wallet_get_withdraw_history_service.go
- wallet_get_withdrawal_fees_service.go
- wallet_withdrawal_service.go
- websocket_service.go
- websocket_service_types.go
Click to show internal directories.
Click to hide internal directories.