-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcancelorders.go
32 lines (26 loc) · 1.04 KB
/
cancelorders.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
package betfair
type (
CancelOrdersParams struct {
MarketID string `json:"marketId,omitempty"`
Instructions []CancelInstruction `json:"instructions,omitempty"`
CustomerRef string `json:"customerRef,omitempty"`
}
CancelInstruction struct {
BetID string `json:"betId,omitempty"`
SizeReduction float64 `json:"sizeReduction,omitempty"`
}
CancelExecutionReport struct {
CustomerRef string `json:"customerRef,omitempty"`
Status ExecutionReportStatus `json:"status"`
ErrorCode ExecutionReportErrorCode `json:"errorCode,omitempty"`
MarketID string `json:"marketId,omitempty"`
InstructionReports []CancelInstructionReport `json:"instructionReports,omitempty"`
}
)
func (client *Client) CancelOrders(params CancelOrdersParams) (CancelExecutionReport, error) {
json := CancelExecutionReport{}
if err := client.GetSports("cancelOrders", params, &json); err != nil {
return CancelExecutionReport{}, err
}
return json, nil
}