Documentation ¶
Index ¶
- Constants
- type FtxClient
- func (client *FtxClient) CancelAllOrders() (Response, error)
- func (client *FtxClient) CancelOrder(orderId int64) (Response, error)
- func (client *FtxClient) CancelTriggerOrder(orderId int64) (Response, error)
- func (client *FtxClient) GetHistoricalPrices(market string, resolution int64, limit int64, startTime int64, endTime int64) (HistoricalPrices, error)
- func (client *FtxClient) GetOpenOrders(market string) (OpenOrders, error)
- func (client *FtxClient) GetOpenTriggerOrders(market string, _type string) (OpenTriggerOrders, error)
- func (client *FtxClient) GetOrderHistory(market string, startTime float64, endTime float64, limit int64) (OrderHistory, error)
- func (client *FtxClient) GetPositions(showAvgPrice bool) (Positions, error)
- func (client *FtxClient) GetTrades(market string, limit int64, startTime int64, endTime int64) (Trades, error)
- func (client *FtxClient) GetTriggerOrdersHistory(market string, startTime float64, endTime float64, limit int64) (TriggerOrderHistory, error)
- func (client *FtxClient) GetTriggers(orderId string) (Triggers, error)
- func (client *FtxClient) PlaceOrder(market string, side string, price float64, _type string, size float64, ...) (NewOrderResponse, error)
- func (client *FtxClient) PlaceTriggerOrder(market string, side string, size float64, _type string, reduceOnly bool, ...) (NewTriggerOrderResponse, error)
- type HistoricalPrices
- type NewOrder
- type NewOrderResponse
- type NewTriggerOrder
- type NewTriggerOrderResponse
- type OpenOrders
- type OpenTriggerOrders
- type Order
- type OrderHistory
- type Positions
- type Response
- type Trades
- type TriggerOrder
- type TriggerOrderHistory
- type Triggers
Constants ¶
View Source
const URL = "https://ftx.com/api/"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FtxClient ¶
func (*FtxClient) CancelAllOrders ¶
func (*FtxClient) CancelOrder ¶
func (*FtxClient) CancelTriggerOrder ¶
func (*FtxClient) GetHistoricalPrices ¶
func (*FtxClient) GetOpenOrders ¶
func (client *FtxClient) GetOpenOrders(market string) (OpenOrders, error)
func (*FtxClient) GetOpenTriggerOrders ¶
func (client *FtxClient) GetOpenTriggerOrders(market string, _type string) (OpenTriggerOrders, error)
func (*FtxClient) GetOrderHistory ¶
func (*FtxClient) GetPositions ¶
func (*FtxClient) GetTriggerOrdersHistory ¶
func (*FtxClient) GetTriggers ¶
func (*FtxClient) PlaceOrder ¶
type HistoricalPrices ¶
type NewOrder ¶
type NewOrder struct { Market string `json:"market"` Side string `json:"side"` Price float64 `json:"price"` Type string `json:"type"` Size float64 `json:"size"` ReduceOnly bool `json:"reduceOnly"` Ioc bool `json:"ioc"` PostOnly bool `json:"postOnly"` ExternalReferralProgram string `json:"externalReferralProgram"` }
type NewOrderResponse ¶
type NewTriggerOrder ¶
type NewTriggerOrder struct { Market string `json:"market"` Side string `json:"side"` Size float64 `json:"size"` Type string `json:"type"` ReduceOnly bool `json:"reduceOnly"` RetryUntilFilled bool `json:"retryUntilFilled"` TriggerPrice float64 `json:"triggerPrice,omitempty"` OrderPrice float64 `json:"orderPrice,omitempty"` TrailValue float64 `json:"trailValue,omitempty"` }
type NewTriggerOrderResponse ¶
type NewTriggerOrderResponse struct { Success bool `json:"success"` Result TriggerOrder `json:"result"` }
type OpenOrders ¶
type OpenTriggerOrders ¶
type OpenTriggerOrders struct { Success bool `json:"success"` Result []TriggerOrder `json:"result"` }
type Order ¶
type Order struct { CreatedAt time.Time `json:"createdAt"` FilledSize float64 `json:"filledSize"` 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"` }
type OrderHistory ¶
type Positions ¶
type Positions struct { Success bool `json:"success"` Result []struct { Cost float64 `json:"cost"` EntryPrice float64 `json:"entryPrice"` EstimatedLiquidationPrice float64 `json:"estimatedLiquidationPrice"` Future string `json:"future"` InitialMarginRequirement float64 `json:"initialMarginRequirement"` LongOrderSize float64 `json:"longOrderSize"` MaintenanceMarginRequirement float64 `json:"maintenanceMarginRequirement"` NetSize float64 `json:"netSize"` OpenSize float64 `json:"openSize"` RealizedPnl float64 `json:"realizedPnl"` ShortOrderSize float64 `json:"shortOrderSize"` Side string `json:"side"` Size float64 `json:"size"` UnrealizedPnl float64 `json:"unrealizedPnl"` } `json:"result"` }
type Response ¶
type Response struct { Success bool `json:"success"` Result interface{} `json:"result"` }
type TriggerOrder ¶
type TriggerOrder struct { CreatedAt time.Time `json:"createdAt"` Error string `json:"error"` Future string `json:"future"` ID int64 `json:"id"` Market string `json:"market"` OrderID int64 `json:"orderId"` OrderPrice float64 `json:"orderPrice"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` Size float64 `json:"size"` Status string `json:"status"` TrailStart float64 `json:"trailStart"` TrailValue float64 `json:"trailValue"` TriggerPrice float64 `json:"triggerPrice"` TriggeredAt string `json:"triggeredAt"` Type string `json:"type"` OrderType string `json:"orderType"` FilledSize float64 `json:"filledSize"` AvgFillPrice float64 `json:"avgFillPrice"` OrderStatus string `json:"orderStatus"` RetryUntilFilled bool `json:"retryUntilFilled"` }
type TriggerOrderHistory ¶
type TriggerOrderHistory struct { Success bool `json:"success"` Result []TriggerOrder `json:"result"` HasMoreData bool `json:"hasMoreData"` }
Click to show internal directories.
Click to hide internal directories.