bbgo_origin/pkg/exchange/ftx/rest_responses.go
2021-03-07 12:51:13 +08:00

40 lines
1.0 KiB
Go

package ftx
import "time"
type balances struct {
Success bool `json:"Success"`
Result []struct {
Coin string `json:"coin"`
Free float64 `json:"free"`
Total float64 `json:"total"`
} `json:"result"`
}
type orders struct {
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"`
}