forked from go-numb/go-ftx
/
cancel-request.go
42 lines (35 loc) · 957 Bytes
/
cancel-request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package options
import (
"fmt"
"net/http"
"time"
)
type RequestForCancelOpQuoteRequest struct {
RequestID int64
}
type ResponseForCancelOpQuoteRequest struct {
ID int64 `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"`
}
func (req *RequestForCancelOpQuoteRequest) Path() string {
return fmt.Sprintf("/options/requests/%d", req.RequestID)
}
func (req *RequestForCancelOpQuoteRequest) Method() string {
return http.MethodDelete
}
func (req *RequestForCancelOpQuoteRequest) Query() string {
return ""
}
func (req *RequestForCancelOpQuoteRequest) Payload() []byte {
return nil
}