-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdateorders.go
38 lines (31 loc) · 1.29 KB
/
updateorders.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
package betfair
type (
UpdateOrdersParams struct {
MarketID string `json:"marketId"`
Instructions []UpdateInstruction `json:"instructions"`
CustomerRef string `json:"customerRef,omitempty"`
}
UpdateInstruction struct {
BetID string `json:"betId"`
NewPersistenceType PersistenceType `json:"newPersistenceType,omitempty"`
}
UpdateExecutionReport struct {
CustomerRef string `json:"customerRef,omitempty"`
Status ExecutionReportStatus `json:"status"`
ErrorCode ExecutionReportErrorCode `json:"errorCode,omitempty"`
MarketID string `json:"marketId,omitempty"`
InstructionReports []UpdateInstructionReport `json:"instructionReports,omitempty"`
}
UpdateInstructionReport struct {
Status InstructionReportStatus `json:"status"`
ErrorCode InstructionReportErrorCode `json:"errorCode,omitempty"`
UpdateInstruction UpdateInstruction `json:"instruction"`
}
)
func (client *Client) UpdateOrders(params UpdateOrdersParams) (UpdateExecutionReport, error) {
json := UpdateExecutionReport{}
if err := client.GetSports("updateOrders", params, &json); err != nil {
return UpdateExecutionReport{}, err
}
return json, nil
}