Documentation ¶
Index ¶
- Variables
- type Api
- func (a Api) Bearer() string
- func (a Api) CancelOrder(orderID string) error
- func (a Api) GetActiveOrdersV3() (OrdersV3, error)
- func (a Api) GetOrder(orderID string) (*OrderV3, error)
- func (a Api) GetOrdersByLimitV3(limit int, accountID string) (OrdersV3, error)
- func (a Api) GetUserAccounts() (*UserAccounts, error)
- func (a Api) Jwt() string
- func (a Api) PlaceOrderV3(req *OrderSentTypeV3) ([]OrderV3, error)
- func (a Api) ReplaceOrder(orderID string, req ReplaceOrderPayload) (*OrderV3, error)
- type ApiMock
- func (a *ApiMock) CancelOrder(orderID string) error
- func (a *ApiMock) GetActiveOrdersV3() (OrdersV3, error)
- func (a *ApiMock) GetOrder(orderID string) (*OrderV3, error)
- func (a *ApiMock) GetOrdersByLimitV3(limit int, accountID string) (OrdersV3, error)
- func (a *ApiMock) PlaceOrderV3(req *OrderSentTypeV3) ([]OrderV3, error)
- func (a *ApiMock) ReplaceOrder(orderID string, req ReplaceOrderPayload) (*OrderV3, error)
- type CancelOrderPayload
- type ErrorResponse
- type Iface
- type OrderFill
- type OrderParameters
- type OrderSentTypeV3
- type OrderState
- type OrderV3
- type OrdersV3
- type ReplaceOrderParameters
- type ReplaceOrderPayload
- type ReplaceOrderResponse
- type Status
- type UserAccount
- type UserAccounts
Constants ¶
This section is empty.
Variables ¶
View Source
var Scopes = []string{
"crossrates", "change", "crossrates", "summary",
"symbols", "feed", "ohlc", "orders", "transactions",
"accounts",
}
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { BaseURL string `json:"baseURL"` ApplicationID string `json:"applicationID"` ClientID string `json:"clientID"` // contains filtered or unexported fields }
func (Api) CancelOrder ¶
CancelOrder cancel trading order
func (Api) GetActiveOrdersV3 ¶
GetActiveOrdersV3 return the list of active trading orders
func (Api) GetOrdersByLimitV3 ¶
func (Api) GetUserAccounts ¶
func (a Api) GetUserAccounts() (*UserAccounts, error)
func (Api) PlaceOrderV3 ¶
func (a Api) PlaceOrderV3(req *OrderSentTypeV3) ([]OrderV3, error)
func (Api) ReplaceOrder ¶
func (a Api) ReplaceOrder(orderID string, req ReplaceOrderPayload) (*OrderV3, error)
type ApiMock ¶
type ApiMock struct { CancelOrderFunc func(orderID string) error GetOrderFunc func(orderID string) (*OrderV3, error) PlaceOrderV3Func func(req *OrderSentTypeV3) ([]OrderV3, error) ReplaceOrderFunc func(orderID string, req ReplaceOrderPayload) (*OrderV3, error) GetOrdersByLimitV3Func func(limit int, accountID string) ([]OrderV3, error) GetActiveOrdersV3Func func() (OrdersV3, error) TotalCalls int TotalPlaceOrderV3 int // contains filtered or unexported fields }
func (*ApiMock) CancelOrder ¶
func (*ApiMock) GetActiveOrdersV3 ¶
func (*ApiMock) GetOrdersByLimitV3 ¶
func (*ApiMock) PlaceOrderV3 ¶
func (a *ApiMock) PlaceOrderV3(req *OrderSentTypeV3) ([]OrderV3, error)
func (*ApiMock) ReplaceOrder ¶
func (a *ApiMock) ReplaceOrder(orderID string, req ReplaceOrderPayload) (*OrderV3, error)
type CancelOrderPayload ¶
type CancelOrderPayload struct {
Action string `json:"action"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Message string
}
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type Iface ¶
type Iface interface { CancelOrder(orderID string) error GetOrder(orderID string) (*OrderV3, error) PlaceOrderV3(req *OrderSentTypeV3) ([]OrderV3, error) ReplaceOrder(orderID string, req ReplaceOrderPayload) (*OrderV3, error) GetActiveOrdersV3() (OrdersV3, error) GetOrdersByLimitV3(limit int, accountID string) (OrdersV3, error) }
type OrderParameters ¶
type OrderParameters struct { Side string `json:"side"` Duration string `json:"duration"` Quantity string `json:"quantity"` Instrument string `json:"instrument"` SymbolId string `json:"symbolId"` OrderType string `json:"orderType"` OcoGroup string `json:"ocoGroup"` IfDoneParentID string `json:"ifDoneParentId"` LimitPrice string `json:"limitPrice"` StopPrice string `json:"stopPrice"` PriceDistance string `json:"priceDistance"` PartQuantity string `json:"partQuantity"` PlaceInterval string `json:"placeInterval"` }
type OrderSentTypeV3 ¶
type OrderSentTypeV3 struct { AccountID string `json:"accountId"` Instrument string `json:"instrument"` Side string `json:"side"` Quantity string `json:"quantity"` Duration string `json:"duration"` ClientTag string `json:"clientTag,omitempty"` OcoGroup string `json:"ocoGroup,omitempty"` LimitPrice string `json:"limitPrice,omitempty"` IfDoneParentID string `json:"ifDoneParentId,omitempty"` OrderType string `json:"orderType"` TakeProfit *string `json:"takeProfit,omitempty"` StopLoss *string `json:"stopLoss,omitempty"` StopPrice *string `json:"stopPrice,omitempty"` SymbolID string `json:"symbolId"` }
type OrderState ¶
type OrderV3 ¶
type OrderV3 struct { OrderState OrderState `json:"orderState"` OrderParameters OrderParameters `json:"orderParameters"` OrderID string `json:"orderId"` PlaceTime string `json:"placeTime"` AccountID string `json:"accountId"` ClientTag string `json:"clientTag"` CurrentModificationID string `json:"currentModificationId"` ExanteAccount string `json:"exanteAccount"` Username string `json:"username"` }
OrderV3 model
type ReplaceOrderParameters ¶
type ReplaceOrderPayload ¶
type ReplaceOrderPayload struct { Action string `json:"action"` Parameters ReplaceOrderParameters `json:"parameters,omitempty"` }
ReplaceOrderPayload method optional payload
type ReplaceOrderResponse ¶
type ReplaceOrderResponse struct {
OrderId string
}
type UserAccount ¶
type UserAccounts ¶
type UserAccounts []UserAccount
Click to show internal directories.
Click to hide internal directories.