Documentation ¶
Index ¶
- type CancelAllOrderParam
- type CancelOrderParam
- type CancelOrderResp
- type CancelSingleOrderParam
- type Client
- func (c Client) CancelAllOrder(params *CancelAllOrderParam) (resp []*types.Order, err error)
- func (c Client) CancelOrder(params *CancelOrderParam) (resp []*CancelOrderResp, err error)
- func (c Client) CancelSingleOrder(params *CancelSingleOrderParam) (*types.Order, error)
- func (c Client) GetActiveInstrument() (resp []*types.Instrument, err error)
- func (c Client) GetBucketedTrade(params *GetBucketedTradeParam) (resp []*types.TradeBin, err error)
- func (c Client) GetInstrument(params *GetInstrumentParam) (resp []*types.Instrument, err error)
- func (c Client) GetOrder(params *GetOrderParam) (resp []*types.Order, err error)
- func (c Client) GetOrderBook(symbol string, depth int) (resp []*types.OrderBook, err error)
- func (c Client) GetPosition(params *GetPositionParam) (resp []*types.Position, err error)
- func (c Client) GetUserMargin() (resp *types.Margin, err error)
- func (c Client) NewOrder(params *NewOrderParam) (resp *types.Order, err error)
- func (c Client) UpdatePositionLeverage(symbol string, leverage float64) (resp *types.Position, err error)
- type GetBucketedTradeParam
- type GetInstrumentParam
- type GetOrderParam
- type GetPositionParam
- type NewOrderParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelAllOrderParam ¶
type CancelOrderParam ¶
type CancelOrderResp ¶
type CancelSingleOrderParam ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) CancelAllOrder ¶
func (c Client) CancelAllOrder(params *CancelAllOrderParam) (resp []*types.Order, err error)
func (Client) CancelOrder ¶
func (c Client) CancelOrder(params *CancelOrderParam) (resp []*CancelOrderResp, err error)
func (Client) CancelSingleOrder ¶
func (c Client) CancelSingleOrder(params *CancelSingleOrderParam) (*types.Order, error)
func (Client) GetActiveInstrument ¶
func (c Client) GetActiveInstrument() (resp []*types.Instrument, err error)
func (Client) GetBucketedTrade ¶
func (c Client) GetBucketedTrade(params *GetBucketedTradeParam) (resp []*types.TradeBin, err error)
func (Client) GetInstrument ¶
func (c Client) GetInstrument(params *GetInstrumentParam) (resp []*types.Instrument, err error)
func (Client) GetOrder ¶
func (c Client) GetOrder(params *GetOrderParam) (resp []*types.Order, err error)
func (Client) GetOrderBook ¶
func (Client) GetPosition ¶
func (c Client) GetPosition(params *GetPositionParam) (resp []*types.Position, err error)
func (Client) GetUserMargin ¶
当前bitmex只有XBt
type GetBucketedTradeParam ¶
type GetBucketedTradeParam struct { /*BinSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. */ BinSize string `mapstructure:"binSize"` /*Columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. */ Columns *string `mapstructure:"columns,omitempty"` /*Count Number of results to fetch. */ Count *int32 `mapstructure:"count,omitempty"` /*EndTime Ending date filter for results. */ EndTime *string `mapstructure:"endTime,omitempty"` /*Filter Generic table filter. Send JSON key/value pairs, such as `{"key": "value"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. */ Filter map[string]interface{} `mapstructure:"filter,omitempty"` /*Partial If true, will send in-progress (incomplete) bins for the current time period. */ Partial *bool `mapstructure:"partial,omitempty"` /*Reverse If true, will sort results newest first. */ Reverse *bool `mapstructure:"reverse,omitempty"` /*Start Starting point for results. */ Start *int32 `mapstructure:"start,omitempty"` /*StartTime Starting date filter for results. ISO time format */ StartTime *string `mapstructure:"startTime,omitempty"` /*Symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. */ Symbol *string `mapstructure:"symbol,omitempty"` }
type GetInstrumentParam ¶
type GetInstrumentParam struct { Symbol *string `mapstructure:"symbol,omitempty"` Filter map[string]interface{} `mapstructure:"filter,omitempty"` Columns []string `mapstructure:"columns,omitempty"` Count *int `mapstructure:"count,omitempty"` Start *int `mapstructure:"start,omitempty"` Reverse *bool `mapstructure:"reverse,omitempty"` StartTime *time.Time `mapstructure:"startTime,omitempty"` EndTime *time.Time `mapstructure:"endTime,omitempty"` }
type GetOrderParam ¶
type GetOrderParam struct { Symbol *string `mapstructure:"symbol,omitempty"` Filter map[string]interface{} `mapstructure:"filter,omitempty"` Columns []string `mapstructure:"columns,omitempty"` Count *int `mapstructure:"count,omitempty"` Start *int `mapstructure:"start,omitempty"` Reverse *bool `mapstructure:"reverse,omitempty"` StartTime *time.Time `mapstructure:"startTime,omitempty"` EndTime *time.Time `mapstructure:"endTime,omitempty"` }
type GetPositionParam ¶
type NewOrderParam ¶
type NewOrderParam struct { Symbol string `mapstructure:"symbol"` Side *string `mapstructure:"side,omitempty"` OrderQty *int64 `mapstructure:"orderQty,omitempty"` Price *float64 `mapstructure:"price,omitempty"` DisplayQty *int64 `mapstructure:"displayQty,omitempty"` StopPx *float64 `mapstructure:"stopPx,omitempty"` ClOrdID *string `mapstructure:"clOrdID,omitempty"` PegOffsetValue *float64 `mapstructure:"pegOffsetValue,omitempty"` PegPriceType *string `mapstructure:"pegPriceType,omitempty"` OrdType *string `mapstructure:"ordType,omitempty"` TimeInForce *string `mapstructure:"timeInForce,omitempty"` ExecInst *string `mapstructure:"execInst,omitempty"` Text *string `mapstructure:"text,omitempty"` }
Click to show internal directories.
Click to hide internal directories.