bbgo_origin/pkg/exchange/ftx/rest_responses.go

46 lines
1.1 KiB
Go
Raw Normal View History

2021-02-08 10:59:36 +00:00
package ftx
2021-03-07 04:47:11 +00:00
import "time"
2021-02-08 10:59:36 +00:00
type balances struct {
Success bool `json:"Success"`
Result []struct {
Coin string `json:"coin"`
Free float64 `json:"free"`
Total float64 `json:"total"`
} `json:"result"`
}
2021-03-07 04:47:11 +00:00
2021-03-12 15:01:46 +00:00
type ordersResponse struct {
2021-03-07 04:47:11 +00:00
Success bool `json:"Success"`
Result []order `json:"result"`
}
type order struct {
CreatedAt time.Time `json:"createdAt"`
FilledSize float64 `json:"filledSize"`
// Future field is not defined in the response format table but in the response example.
Future string `json:"future"`
ID int64 `json:"id"`
Market string `json:"market"`
Price float64 `json:"price"`
AvgFillPrice float64 `json:"avgFillPrice"`
RemainingSize float64 `json:"remainingSize"`
Side string `json:"side"`
Size float64 `json:"size"`
Status string `json:"status"`
Type string `json:"type"`
ReduceOnly bool `json:"reduceOnly"`
Ioc bool `json:"ioc"`
PostOnly bool `json:"postOnly"`
ClientId string `json:"clientId"`
}
2021-03-13 01:51:03 +00:00
type orderResponse struct {
Success bool `json:"Success"`
Result order `json:"result"`
}