options

package
v0.0.0-...-8b5824e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyOpQuote

type MyOpQuote struct {
	ID     int `json:"id"`
	Option struct {
		Underlying string    `json:"underlying"`
		Type       string    `json:"type"`
		Strike     float64   `json:"strike"`
		Expiry     time.Time `json:"expiry"`
	} `json:"option"`
	Status         string  `json:"status"`
	Side           string  `json:"side"`
	Size           float64 `json:"size"`
	LimitPrice     float64 `json:"limitPrice"`
	HideLimitPrice bool    `json:"hideLimitPrice"`
	Quotes         []struct {
		ID          int       `json:"id"`
		Collateral  float64   `json:"collateral"`
		Price       float64   `json:"price"`
		Status      string    `json:"status"`
		QuoteExpiry time.Time `json:"quoteExpiry"`
		Time        time.Time `json:"time"`
	} `json:"quotes"`

	Time          time.Time `json:"time"`
	RequestExpiry time.Time `json:"requestExpiry"`
}

type OpFill

type OpFill struct {
	ID        int       `json:"id"`
	Liquidity string    `json:"liquidity"`
	Side      string    `json:"side"`
	Price     float64   `json:"price"`
	QuoteID   float64   `json:"quoteId"`
	Size      float64   `json:"size"`
	Fee       float64   `json:"fee"`
	FeeRate   float64   `json:"feeRate"`
	Option    Option    `json:"option"`
	Time      time.Time `json:"time"`
}

type OpPosition

type OpPosition struct {
	Side       string  `json:"side"`
	EntryPrice float64 `json:"entryPrice"`
	Size       float64 `json:"size"`
	NetSize    float64 `json:"netSize"`
	Option     Option  `json:"option"`
}

type OpQuote

type OpQuote struct {
	ID     int `json:"id"`
	Option struct {
		Underlying string    `json:"underlying"`
		Type       string    `json:"type"`
		Strike     float64   `json:"strike"`
		Expiry     time.Time `json:"expiry"`
	} `json:"option"`
	Side   string  `json:"side"`
	Size   float64 `json:"size"`
	Status string  `json:"status"`

	Time          time.Time `json:"time"`
	RequestExpiry time.Time `json:"requestExpiry"`
}

type OpTrade

type OpTrade struct {
	ID     int       `json:"id"`
	Price  float64   `json:"price"`
	Size   float64   `json:"size"`
	Option Option    `json:"option"`
	Time   time.Time `json:"time"`
}

type Option

type Option struct {
	Underlying string    `json:"underlying"`
	Type       string    `json:"type"`
	Strike     float64   `json:"strike"`
	Expiry     time.Time `json:"expiry"`
}

type Quote

type Quote struct {
	ID          int     `json:"id"`
	RequestID   int     `json:"requestId"`
	Status      string  `json:"status"`
	QuoterSide  string  `json:"quoterSide"`
	RequestSide string  `json:"requestSide"`
	Price       float64 `json:"price"`
	Size        float64 `json:"size"`
	Collateral  float64 `json:"collateral"`

	Option Option `json:"option"`

	QuoteExpiry time.Time `json:"quoteExpiry"`
	Time        time.Time `json:"time"`
}

type RequestForAcceptOpQuote

type RequestForAcceptOpQuote struct {
	QuoteID int
}

func (*RequestForAcceptOpQuote) Method

func (req *RequestForAcceptOpQuote) Method() string

func (*RequestForAcceptOpQuote) Path

func (req *RequestForAcceptOpQuote) Path() string

func (*RequestForAcceptOpQuote) Payload

func (req *RequestForAcceptOpQuote) Payload() []byte

func (*RequestForAcceptOpQuote) Query

func (req *RequestForAcceptOpQuote) Query() string

type RequestForCancelOpQuote

type RequestForCancelOpQuote struct {
	QuoteID int
}

func (*RequestForCancelOpQuote) Method

func (req *RequestForCancelOpQuote) Method() string

func (*RequestForCancelOpQuote) Path

func (req *RequestForCancelOpQuote) Path() string

func (*RequestForCancelOpQuote) Payload

func (req *RequestForCancelOpQuote) Payload() []byte

func (*RequestForCancelOpQuote) Query

func (req *RequestForCancelOpQuote) Query() string

type RequestForCancelOpQuoteRequest

type RequestForCancelOpQuoteRequest struct {
	RequestID int
}

func (*RequestForCancelOpQuoteRequest) Method

func (req *RequestForCancelOpQuoteRequest) Method() string

func (*RequestForCancelOpQuoteRequest) Path

func (*RequestForCancelOpQuoteRequest) Payload

func (req *RequestForCancelOpQuoteRequest) Payload() []byte

func (*RequestForCancelOpQuoteRequest) Query

type RequestForCreateOpQuoteRequest

type RequestForCreateOpQuoteRequest struct {
	Underlying string  `json:"underlying"`
	Type       string  `json:"type"`
	Side       string  `json:"side"`
	Strike     float64 `json:"strike"`
	Size       float64 `json:"size"`
	Expiry     int64   `json:"expiry"`
	// Options
	LimitPrice     float64 `json:"limitPrice,omitempty"`
	HideLimitPrice bool    `json:"hideLimitPrice,omitempty"`
	RequestExpiry  int64   `json:"requestExpiry,omitempty"`
	CounterpartyID int     `json:"counterpartyId,omitempty"`
}

func (*RequestForCreateOpQuoteRequest) Method

func (req *RequestForCreateOpQuoteRequest) Method() string

func (*RequestForCreateOpQuoteRequest) Path

func (*RequestForCreateOpQuoteRequest) Payload

func (req *RequestForCreateOpQuoteRequest) Payload() []byte

func (*RequestForCreateOpQuoteRequest) Query

type RequestForModifyOpQuoteRequest

type RequestForModifyOpQuoteRequest struct {
	RequestID int     `json:"-"`
	Price     float64 `json:"price"`
}

Document記載はCreate quoteだが、modify request

func (*RequestForModifyOpQuoteRequest) Method

func (req *RequestForModifyOpQuoteRequest) Method() string

func (*RequestForModifyOpQuoteRequest) Path

func (*RequestForModifyOpQuoteRequest) Payload

func (req *RequestForModifyOpQuoteRequest) Payload() []byte

func (*RequestForModifyOpQuoteRequest) Query

type RequestForMyOpQuoteRequest

type RequestForMyOpQuoteRequest struct {
	RequestID int
}

func (*RequestForMyOpQuoteRequest) Method

func (req *RequestForMyOpQuoteRequest) Method() string

func (*RequestForMyOpQuoteRequest) Path

func (req *RequestForMyOpQuoteRequest) Path() string

func (*RequestForMyOpQuoteRequest) Payload

func (req *RequestForMyOpQuoteRequest) Payload() []byte

func (*RequestForMyOpQuoteRequest) Query

func (req *RequestForMyOpQuoteRequest) Query() string

type RequestForMyOpQuoteRequests

type RequestForMyOpQuoteRequests struct {
}

func (*RequestForMyOpQuoteRequests) Method

func (req *RequestForMyOpQuoteRequests) Method() string

func (*RequestForMyOpQuoteRequests) Path

func (req *RequestForMyOpQuoteRequests) Path() string

func (*RequestForMyOpQuoteRequests) Payload

func (req *RequestForMyOpQuoteRequests) Payload() []byte

func (*RequestForMyOpQuoteRequests) Query

func (req *RequestForMyOpQuoteRequests) Query() string

type RequestForMyOpQuotes

type RequestForMyOpQuotes struct {
}

func (*RequestForMyOpQuotes) Method

func (req *RequestForMyOpQuotes) Method() string

func (*RequestForMyOpQuotes) Path

func (req *RequestForMyOpQuotes) Path() string

func (*RequestForMyOpQuotes) Payload

func (req *RequestForMyOpQuotes) Payload() []byte

func (*RequestForMyOpQuotes) Query

func (req *RequestForMyOpQuotes) Query() string

type RequestForOpFills

type RequestForOpFills struct {
	Limit int   `url:"limit,omitempty"`
	Start int64 `url:"start_time,omitempty"`
	End   int64 `url:"end_time,omitempty"`
}

func (*RequestForOpFills) Method

func (req *RequestForOpFills) Method() string

func (*RequestForOpFills) Path

func (req *RequestForOpFills) Path() string

func (*RequestForOpFills) Payload

func (req *RequestForOpFills) Payload() []byte

func (*RequestForOpFills) Query

func (req *RequestForOpFills) Query() string

type RequestForOpPositions

type RequestForOpPositions struct {
}

func (*RequestForOpPositions) Method

func (req *RequestForOpPositions) Method() string

func (*RequestForOpPositions) Path

func (req *RequestForOpPositions) Path() string

func (*RequestForOpPositions) Payload

func (req *RequestForOpPositions) Payload() []byte

func (*RequestForOpPositions) Query

func (req *RequestForOpPositions) Query() string

type RequestForOpQuoteRequests

type RequestForOpQuoteRequests struct {
}

func (*RequestForOpQuoteRequests) Method

func (req *RequestForOpQuoteRequests) Method() string

func (*RequestForOpQuoteRequests) Path

func (req *RequestForOpQuoteRequests) Path() string

func (*RequestForOpQuoteRequests) Payload

func (req *RequestForOpQuoteRequests) Payload() []byte

func (*RequestForOpQuoteRequests) Query

func (req *RequestForOpQuoteRequests) Query() string

type RequestForOpTrades

type RequestForOpTrades struct {
	Limit int   `url:"limit,omitempty"`
	Start int64 `url:"start_time,omitempty"`
	End   int64 `url:"end_time,omitempty"`
}

func (*RequestForOpTrades) Method

func (req *RequestForOpTrades) Method() string

func (*RequestForOpTrades) Path

func (req *RequestForOpTrades) Path() string

func (*RequestForOpTrades) Payload

func (req *RequestForOpTrades) Payload() []byte

func (*RequestForOpTrades) Query

func (req *RequestForOpTrades) Query() string

type ResponseForAcceptOpQuote

type ResponseForAcceptOpQuote Quote

type ResponseForCancelOpQuote

type ResponseForCancelOpQuote Quote

type ResponseForCancelOpQuoteRequest

type ResponseForCancelOpQuoteRequest struct {
	ID     int `json:"id"`
	Option struct {
		Expiry     time.Time `json:"expiry"`
		Strike     float64   `json:"strike"`
		Type       string    `json:"type"`
		Underlying string    `json:"underlying"`
	} `json:"option"`
	Status        string    `json:"status"`
	Side          string    `json:"side"`
	Size          float64   `json:"size"`
	RequestExpiry time.Time `json:"requestExpiry"`
	Time          time.Time `json:"time"`
}

type ResponseForCreateOpQuoteRequest

type ResponseForCreateOpQuoteRequest struct {
	ID     int `json:"id"`
	Option struct {
		Strike     float64   `json:"strike"`
		Type       string    `json:"type"`
		Underlying string    `json:"underlying"`
		Expiry     time.Time `json:"expiry"`
	} `json:"option"`
	Strike        int       `json:"strike"`
	Type          string    `json:"type"`
	Underlying    string    `json:"underlying"`
	Side          string    `json:"side"`
	Status        string    `json:"status"`
	Size          float64   `json:"size"`
	Expiry        time.Time `json:"expiry"`
	RequestExpiry time.Time `json:"requestExpiry"`
	Time          time.Time `json:"time"`
}

type ResponseForModifyOpQuoteRequest

type ResponseForModifyOpQuoteRequest Quote

type ResponseForMyOpQuoteRequest

type ResponseForMyOpQuoteRequest []Quote

type ResponseForMyOpQuoteRequests

type ResponseForMyOpQuoteRequests []MyOpQuote

type ResponseForMyOpQuotes

type ResponseForMyOpQuotes []Quote

type ResponseForOpFills

type ResponseForOpFills []OpTrade

type ResponseForOpPositions

type ResponseForOpPositions []OpPosition

type ResponseForOpQuoteRequests

type ResponseForOpQuoteRequests []OpQuote

type ResponseForOpTrades

type ResponseForOpTrades []OpTrade

Jump to

Keyboard shortcuts

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