From 14a49989fe380d0130e39c31d9517a1b4e182fd9 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 25 Feb 2022 16:40:11 +0800 Subject: [PATCH] ftxapi: define types --- pkg/exchange/ftx/ftxapi/types.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pkg/exchange/ftx/ftxapi/types.go diff --git a/pkg/exchange/ftx/ftxapi/types.go b/pkg/exchange/ftx/ftxapi/types.go new file mode 100644 index 000000000..21eba5bf9 --- /dev/null +++ b/pkg/exchange/ftx/ftxapi/types.go @@ -0,0 +1,30 @@ +package ftxapi + + +type Side string + +const ( + SideBuy Side = "buy" + SideSell Side = "sell" +) + + +type OrderType string + +const ( + OrderTypeLimit OrderType = "limit" + OrderTypeMarket OrderType = "market" + + // trigger order types + OrderTypeStopLimit OrderType = "stop" + OrderTypeTrailingStop OrderType = "trailingStop" + OrderTypeTakeProfit OrderType = "takeProfit" +) + +type OrderStatus string + +const ( + OrderStatusNew OrderStatus = "new" + OrderStatusOpen OrderStatus = "open" + OrderStatusClosed OrderStatus = "closed" +)