func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	if o.Count != nil {
		var qrCount int64
		if o.Count != nil {
			qrCount = *o.Count
		}
		qCount := swag.FormatInt64(qrCount)
		if qCount != "" {
			if err := r.SetQueryParam("count", qCount); err != nil {
				return err
			}
		}
	}
	qrEndTimestamp := o.EndTimestamp
	qEndTimestamp := swag.FormatInt64(qrEndTimestamp)
	if qEndTimestamp != "" {
		if err := r.SetQueryParam("end_timestamp", qEndTimestamp); err != nil {
			return err
		}
	}
	if o.IncludeOld != nil {
		var qrIncludeOld bool
		if o.IncludeOld != nil {
			qrIncludeOld = *o.IncludeOld
		}
		qIncludeOld := swag.FormatBool(qrIncludeOld)
		if qIncludeOld != "" {
			if err := r.SetQueryParam("include_old", qIncludeOld); err != nil {
				return err
			}
		}
	}
	qrInstrumentName := o.InstrumentName
	qInstrumentName := qrInstrumentName
	if qInstrumentName != "" {
		if err := r.SetQueryParam("instrument_name", qInstrumentName); err != nil {
			return err
		}
	}
	if o.Sorting != nil {
		var qrSorting string
		if o.Sorting != nil {
			qrSorting = *o.Sorting
		}
		qSorting := qrSorting
		if qSorting != "" {
			if err := r.SetQueryParam("sorting", qSorting); err != nil {
				return err
			}
		}
	}
	qrStartTimestamp := o.StartTimestamp
	qStartTimestamp := swag.FormatInt64(qrStartTimestamp)
	if qStartTimestamp != "" {
		if err := r.SetQueryParam("start_timestamp", qStartTimestamp); err != nil {
			return err
		}
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
WriteToRequest writes these params to a swagger request
package operations
import (
	"context"
	"net/http"
	"time"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/swag"
	strfmt "github.com/go-openapi/strfmt"
)
func NewGetPrivateGetUserTradesByInstrumentAndTimeParams() *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	var ()
	return &GetPrivateGetUserTradesByInstrumentAndTimeParams{
		timeout: cr.DefaultTimeout,
	}
}
func NewGetPrivateGetUserTradesByInstrumentAndTimeParamsWithTimeout(timeout time.Duration) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	var ()
	return &GetPrivateGetUserTradesByInstrumentAndTimeParams{
		timeout: timeout,
	}
}
func NewGetPrivateGetUserTradesByInstrumentAndTimeParamsWithContext(ctx context.Context) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	var ()
	return &GetPrivateGetUserTradesByInstrumentAndTimeParams{
		Context: ctx,
	}
}
func NewGetPrivateGetUserTradesByInstrumentAndTimeParamsWithHTTPClient(client *http.Client) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	var ()
	return &GetPrivateGetUserTradesByInstrumentAndTimeParams{
		HTTPClient: client,
	}
}
type GetPrivateGetUserTradesByInstrumentAndTimeParams struct {
	Count *int64
	EndTimestamp int64
	IncludeOld *bool
	InstrumentName string
	Sorting *string
	StartTimestamp int64
	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithTimeout(timeout time.Duration) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetTimeout(timeout)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithContext(ctx context.Context) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetContext(ctx)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetContext(ctx context.Context) {
	o.Context = ctx
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithHTTPClient(client *http.Client) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetHTTPClient(client)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithCount(count *int64) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetCount(count)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetCount(count *int64) {
	o.Count = count
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithEndTimestamp(endTimestamp int64) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetEndTimestamp(endTimestamp)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetEndTimestamp(endTimestamp int64) {
	o.EndTimestamp = endTimestamp
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithIncludeOld(includeOld *bool) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetIncludeOld(includeOld)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetIncludeOld(includeOld *bool) {
	o.IncludeOld = includeOld
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithInstrumentName(instrumentName string) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetInstrumentName(instrumentName)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetInstrumentName(instrumentName string) {
	o.InstrumentName = instrumentName
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithSorting(sorting *string) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetSorting(sorting)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetSorting(sorting *string) {
	o.Sorting = sorting
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) WithStartTimestamp(startTimestamp int64) *GetPrivateGetUserTradesByInstrumentAndTimeParams {
	o.SetStartTimestamp(startTimestamp)
	return o
}
func (o *GetPrivateGetUserTradesByInstrumentAndTimeParams) SetStartTimestamp(startTimestamp int64) {
	o.StartTimestamp = startTimestamp
}