trade

package
v0.0.0-...-1dccf95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2022 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for trade API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new trade API client.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) TradeGet

func (a *Client) TradeGet(params *TradeGetParams) (*TradeGetOK, error)

TradeGet gets trades

Please note that indices (symbols starting with `.`) post trades at intervals to the trade feed. These have a `size` of 0 and are used only to indicate a changing price.

See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AE_6569.html) for explanations of these fields.

func (*Client) TradeGetBucketed

func (a *Client) TradeGetBucketed(params *TradeGetBucketedParams) (*TradeGetBucketedOK, error)

TradeGetBucketed gets previous trades in time buckets

type TradeGetBadRequest

type TradeGetBadRequest struct {
	Payload *models.Error
}

TradeGetBadRequest handles this case with default header values.

Parameter Error

func NewTradeGetBadRequest

func NewTradeGetBadRequest() *TradeGetBadRequest

NewTradeGetBadRequest creates a TradeGetBadRequest with default headers values

func (*TradeGetBadRequest) Error

func (o *TradeGetBadRequest) Error() string

type TradeGetBucketedBadRequest

type TradeGetBucketedBadRequest struct {
	Payload *models.Error
}

TradeGetBucketedBadRequest handles this case with default header values.

Parameter Error

func NewTradeGetBucketedBadRequest

func NewTradeGetBucketedBadRequest() *TradeGetBucketedBadRequest

NewTradeGetBucketedBadRequest creates a TradeGetBucketedBadRequest with default headers values

func (*TradeGetBucketedBadRequest) Error

type TradeGetBucketedNotFound

type TradeGetBucketedNotFound struct {
	Payload *models.Error
}

TradeGetBucketedNotFound handles this case with default header values.

Not Found

func NewTradeGetBucketedNotFound

func NewTradeGetBucketedNotFound() *TradeGetBucketedNotFound

NewTradeGetBucketedNotFound creates a TradeGetBucketedNotFound with default headers values

func (*TradeGetBucketedNotFound) Error

func (o *TradeGetBucketedNotFound) Error() string

type TradeGetBucketedOK

type TradeGetBucketedOK struct {
	Payload []*models.TradeBin
}

TradeGetBucketedOK handles this case with default header values.

Request was successful

func NewTradeGetBucketedOK

func NewTradeGetBucketedOK() *TradeGetBucketedOK

NewTradeGetBucketedOK creates a TradeGetBucketedOK with default headers values

func (*TradeGetBucketedOK) Error

func (o *TradeGetBucketedOK) Error() string

type TradeGetBucketedParams

type TradeGetBucketedParams struct {

	/*BinSize
	  Time interval to bucket by. Available options: [1m,5m,1h,1d].

	*/
	BinSize *string
	/*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
	/*Count
	  Number of results to fetch.

	*/
	Count *int32
	/*EndTime
	  Ending date filter for results.

	*/
	EndTime *strfmt.DateTime
	/*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 *string
	/*Partial
	  If true, will send in-progress (incomplete) bins for the current time period.

	*/
	Partial *bool
	/*Reverse
	  If true, will sort results newest first.

	*/
	Reverse *bool
	/*Start
	  Starting point for results.

	*/
	Start *int32
	/*StartTime
	  Starting date filter for results.

	*/
	StartTime *strfmt.DateTime
	/*Symbol
	  Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

	You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.

	*/
	Symbol *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

TradeGetBucketedParams contains all the parameters to send to the API endpoint for the trade get bucketed operation typically these are written to a http.Request

func NewTradeGetBucketedParams

func NewTradeGetBucketedParams() *TradeGetBucketedParams

NewTradeGetBucketedParams creates a new TradeGetBucketedParams object with the default values initialized.

func NewTradeGetBucketedParamsWithContext

func NewTradeGetBucketedParamsWithContext(ctx context.Context) *TradeGetBucketedParams

NewTradeGetBucketedParamsWithContext creates a new TradeGetBucketedParams object with the default values initialized, and the ability to set a context for a request

func NewTradeGetBucketedParamsWithHTTPClient

func NewTradeGetBucketedParamsWithHTTPClient(client *http.Client) *TradeGetBucketedParams

NewTradeGetBucketedParamsWithHTTPClient creates a new TradeGetBucketedParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewTradeGetBucketedParamsWithTimeout

func NewTradeGetBucketedParamsWithTimeout(timeout time.Duration) *TradeGetBucketedParams

NewTradeGetBucketedParamsWithTimeout creates a new TradeGetBucketedParams object with the default values initialized, and the ability to set a timeout on a request

func (*TradeGetBucketedParams) SetBinSize

func (o *TradeGetBucketedParams) SetBinSize(binSize *string)

SetBinSize adds the binSize to the trade get bucketed params

func (*TradeGetBucketedParams) SetColumns

func (o *TradeGetBucketedParams) SetColumns(columns *string)

SetColumns adds the columns to the trade get bucketed params

func (*TradeGetBucketedParams) SetContext

func (o *TradeGetBucketedParams) SetContext(ctx context.Context)

SetContext adds the context to the trade get bucketed params

func (*TradeGetBucketedParams) SetCount

func (o *TradeGetBucketedParams) SetCount(count *int32)

SetCount adds the count to the trade get bucketed params

func (*TradeGetBucketedParams) SetEndTime

func (o *TradeGetBucketedParams) SetEndTime(endTime *strfmt.DateTime)

SetEndTime adds the endTime to the trade get bucketed params

func (*TradeGetBucketedParams) SetFilter

func (o *TradeGetBucketedParams) SetFilter(filter *string)

SetFilter adds the filter to the trade get bucketed params

func (*TradeGetBucketedParams) SetHTTPClient

func (o *TradeGetBucketedParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the trade get bucketed params

func (*TradeGetBucketedParams) SetPartial

func (o *TradeGetBucketedParams) SetPartial(partial *bool)

SetPartial adds the partial to the trade get bucketed params

func (*TradeGetBucketedParams) SetReverse

func (o *TradeGetBucketedParams) SetReverse(reverse *bool)

SetReverse adds the reverse to the trade get bucketed params

func (*TradeGetBucketedParams) SetStart

func (o *TradeGetBucketedParams) SetStart(start *int32)

SetStart adds the start to the trade get bucketed params

func (*TradeGetBucketedParams) SetStartTime

func (o *TradeGetBucketedParams) SetStartTime(startTime *strfmt.DateTime)

SetStartTime adds the startTime to the trade get bucketed params

func (*TradeGetBucketedParams) SetSymbol

func (o *TradeGetBucketedParams) SetSymbol(symbol *string)

SetSymbol adds the symbol to the trade get bucketed params

func (*TradeGetBucketedParams) SetTimeout

func (o *TradeGetBucketedParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the trade get bucketed params

func (*TradeGetBucketedParams) WithBinSize

func (o *TradeGetBucketedParams) WithBinSize(binSize *string) *TradeGetBucketedParams

WithBinSize adds the binSize to the trade get bucketed params

func (*TradeGetBucketedParams) WithColumns

func (o *TradeGetBucketedParams) WithColumns(columns *string) *TradeGetBucketedParams

WithColumns adds the columns to the trade get bucketed params

func (*TradeGetBucketedParams) WithContext

WithContext adds the context to the trade get bucketed params

func (*TradeGetBucketedParams) WithCount

func (o *TradeGetBucketedParams) WithCount(count *int32) *TradeGetBucketedParams

WithCount adds the count to the trade get bucketed params

func (*TradeGetBucketedParams) WithEndTime

WithEndTime adds the endTime to the trade get bucketed params

func (*TradeGetBucketedParams) WithFilter

func (o *TradeGetBucketedParams) WithFilter(filter *string) *TradeGetBucketedParams

WithFilter adds the filter to the trade get bucketed params

func (*TradeGetBucketedParams) WithHTTPClient

func (o *TradeGetBucketedParams) WithHTTPClient(client *http.Client) *TradeGetBucketedParams

WithHTTPClient adds the HTTPClient to the trade get bucketed params

func (*TradeGetBucketedParams) WithPartial

func (o *TradeGetBucketedParams) WithPartial(partial *bool) *TradeGetBucketedParams

WithPartial adds the partial to the trade get bucketed params

func (*TradeGetBucketedParams) WithReverse

func (o *TradeGetBucketedParams) WithReverse(reverse *bool) *TradeGetBucketedParams

WithReverse adds the reverse to the trade get bucketed params

func (*TradeGetBucketedParams) WithStart

func (o *TradeGetBucketedParams) WithStart(start *int32) *TradeGetBucketedParams

WithStart adds the start to the trade get bucketed params

func (*TradeGetBucketedParams) WithStartTime

func (o *TradeGetBucketedParams) WithStartTime(startTime *strfmt.DateTime) *TradeGetBucketedParams

WithStartTime adds the startTime to the trade get bucketed params

func (*TradeGetBucketedParams) WithSymbol

func (o *TradeGetBucketedParams) WithSymbol(symbol *string) *TradeGetBucketedParams

WithSymbol adds the symbol to the trade get bucketed params

func (*TradeGetBucketedParams) WithTimeout

WithTimeout adds the timeout to the trade get bucketed params

func (*TradeGetBucketedParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type TradeGetBucketedReader

type TradeGetBucketedReader struct {
	// contains filtered or unexported fields
}

TradeGetBucketedReader is a Reader for the TradeGetBucketed structure.

func (*TradeGetBucketedReader) ReadResponse

func (o *TradeGetBucketedReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type TradeGetBucketedUnauthorized

type TradeGetBucketedUnauthorized struct {
	Payload *models.Error
}

TradeGetBucketedUnauthorized handles this case with default header values.

Unauthorized

func NewTradeGetBucketedUnauthorized

func NewTradeGetBucketedUnauthorized() *TradeGetBucketedUnauthorized

NewTradeGetBucketedUnauthorized creates a TradeGetBucketedUnauthorized with default headers values

func (*TradeGetBucketedUnauthorized) Error

type TradeGetNotFound

type TradeGetNotFound struct {
	Payload *models.Error
}

TradeGetNotFound handles this case with default header values.

Not Found

func NewTradeGetNotFound

func NewTradeGetNotFound() *TradeGetNotFound

NewTradeGetNotFound creates a TradeGetNotFound with default headers values

func (*TradeGetNotFound) Error

func (o *TradeGetNotFound) Error() string

type TradeGetOK

type TradeGetOK struct {
	Payload []*models.Trade
}

TradeGetOK handles this case with default header values.

Request was successful

func NewTradeGetOK

func NewTradeGetOK() *TradeGetOK

NewTradeGetOK creates a TradeGetOK with default headers values

func (*TradeGetOK) Error

func (o *TradeGetOK) Error() string

type TradeGetParams

type TradeGetParams struct {

	/*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
	/*Count
	  Number of results to fetch.

	*/
	Count *int32
	/*EndTime
	  Ending date filter for results.

	*/
	EndTime *strfmt.DateTime
	/*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 *string
	/*Reverse
	  If true, will sort results newest first.

	*/
	Reverse *bool
	/*Start
	  Starting point for results.

	*/
	Start *int32
	/*StartTime
	  Starting date filter for results.

	*/
	StartTime *strfmt.DateTime
	/*Symbol
	  Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

	You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.

	*/
	Symbol *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

TradeGetParams contains all the parameters to send to the API endpoint for the trade get operation typically these are written to a http.Request

func NewTradeGetParams

func NewTradeGetParams() *TradeGetParams

NewTradeGetParams creates a new TradeGetParams object with the default values initialized.

func NewTradeGetParamsWithContext

func NewTradeGetParamsWithContext(ctx context.Context) *TradeGetParams

NewTradeGetParamsWithContext creates a new TradeGetParams object with the default values initialized, and the ability to set a context for a request

func NewTradeGetParamsWithHTTPClient

func NewTradeGetParamsWithHTTPClient(client *http.Client) *TradeGetParams

NewTradeGetParamsWithHTTPClient creates a new TradeGetParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewTradeGetParamsWithTimeout

func NewTradeGetParamsWithTimeout(timeout time.Duration) *TradeGetParams

NewTradeGetParamsWithTimeout creates a new TradeGetParams object with the default values initialized, and the ability to set a timeout on a request

func (*TradeGetParams) SetColumns

func (o *TradeGetParams) SetColumns(columns *string)

SetColumns adds the columns to the trade get params

func (*TradeGetParams) SetContext

func (o *TradeGetParams) SetContext(ctx context.Context)

SetContext adds the context to the trade get params

func (*TradeGetParams) SetCount

func (o *TradeGetParams) SetCount(count *int32)

SetCount adds the count to the trade get params

func (*TradeGetParams) SetEndTime

func (o *TradeGetParams) SetEndTime(endTime *strfmt.DateTime)

SetEndTime adds the endTime to the trade get params

func (*TradeGetParams) SetFilter

func (o *TradeGetParams) SetFilter(filter *string)

SetFilter adds the filter to the trade get params

func (*TradeGetParams) SetHTTPClient

func (o *TradeGetParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the trade get params

func (*TradeGetParams) SetReverse

func (o *TradeGetParams) SetReverse(reverse *bool)

SetReverse adds the reverse to the trade get params

func (*TradeGetParams) SetStart

func (o *TradeGetParams) SetStart(start *int32)

SetStart adds the start to the trade get params

func (*TradeGetParams) SetStartTime

func (o *TradeGetParams) SetStartTime(startTime *strfmt.DateTime)

SetStartTime adds the startTime to the trade get params

func (*TradeGetParams) SetSymbol

func (o *TradeGetParams) SetSymbol(symbol *string)

SetSymbol adds the symbol to the trade get params

func (*TradeGetParams) SetTimeout

func (o *TradeGetParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the trade get params

func (*TradeGetParams) WithColumns

func (o *TradeGetParams) WithColumns(columns *string) *TradeGetParams

WithColumns adds the columns to the trade get params

func (*TradeGetParams) WithContext

func (o *TradeGetParams) WithContext(ctx context.Context) *TradeGetParams

WithContext adds the context to the trade get params

func (*TradeGetParams) WithCount

func (o *TradeGetParams) WithCount(count *int32) *TradeGetParams

WithCount adds the count to the trade get params

func (*TradeGetParams) WithEndTime

func (o *TradeGetParams) WithEndTime(endTime *strfmt.DateTime) *TradeGetParams

WithEndTime adds the endTime to the trade get params

func (*TradeGetParams) WithFilter

func (o *TradeGetParams) WithFilter(filter *string) *TradeGetParams

WithFilter adds the filter to the trade get params

func (*TradeGetParams) WithHTTPClient

func (o *TradeGetParams) WithHTTPClient(client *http.Client) *TradeGetParams

WithHTTPClient adds the HTTPClient to the trade get params

func (*TradeGetParams) WithReverse

func (o *TradeGetParams) WithReverse(reverse *bool) *TradeGetParams

WithReverse adds the reverse to the trade get params

func (*TradeGetParams) WithStart

func (o *TradeGetParams) WithStart(start *int32) *TradeGetParams

WithStart adds the start to the trade get params

func (*TradeGetParams) WithStartTime

func (o *TradeGetParams) WithStartTime(startTime *strfmt.DateTime) *TradeGetParams

WithStartTime adds the startTime to the trade get params

func (*TradeGetParams) WithSymbol

func (o *TradeGetParams) WithSymbol(symbol *string) *TradeGetParams

WithSymbol adds the symbol to the trade get params

func (*TradeGetParams) WithTimeout

func (o *TradeGetParams) WithTimeout(timeout time.Duration) *TradeGetParams

WithTimeout adds the timeout to the trade get params

func (*TradeGetParams) WriteToRequest

func (o *TradeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type TradeGetReader

type TradeGetReader struct {
	// contains filtered or unexported fields
}

TradeGetReader is a Reader for the TradeGet structure.

func (*TradeGetReader) ReadResponse

func (o *TradeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type TradeGetUnauthorized

type TradeGetUnauthorized struct {
	Payload *models.Error
}

TradeGetUnauthorized handles this case with default header values.

Unauthorized

func NewTradeGetUnauthorized

func NewTradeGetUnauthorized() *TradeGetUnauthorized

NewTradeGetUnauthorized creates a TradeGetUnauthorized with default headers values

func (*TradeGetUnauthorized) Error

func (o *TradeGetUnauthorized) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL