mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
Getting closed orders implementation, fixed Binance MARKET order creation, expanded SubmitOrder response (#572)
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce * return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo * removed the Binance extra method GetClosedOrder * func description corrected * removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side * GetClosedOrder implementation moved to GetOrderInfo * changed GetOrderInfo params * removed Canceled order.Type used for Kraken * update QueryOrder in gctscript * add missed params to QueryOrder validator (gctscript) * fixed testing issues * GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce * return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo * removed the Binance extra method GetClosedOrder * func description corrected * removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side * GetClosedOrder implementation moved to GetOrderInfo * changed GetOrderInfo params * removed Canceled order.Type used for Kraken * update QueryOrder in gctscript * add missed params to QueryOrder validator (gctscript) * fixed testing issues * pull previous changes * linter issues fix * updated query_order exmple in gctscript, fixed params check * removed orderPair unnecessary conversion Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
This commit is contained in:
@@ -362,8 +362,8 @@ func ({{.Variable}} *{{.CapitalName}}) CancelAllOrders(orderCancellation *order.
|
||||
return order.CancelAllResponse{}, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func ({{.Variable}} *{{.CapitalName}}) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func ({{.Variable}} *{{.CapitalName}}) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
return order.Detail{}, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ func testWrappers(e exchange.IBotExchange) []string {
|
||||
funcs = append(funcs, "CancelAllOrders")
|
||||
}
|
||||
|
||||
_, err = e.GetOrderInfo("1")
|
||||
_, err = e.GetOrderInfo("1", p, assetType)
|
||||
if err == common.ErrNotYetImplemented {
|
||||
funcs = append(funcs, "GetOrderInfo")
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config)
|
||||
})
|
||||
|
||||
var r15 order.Detail
|
||||
r15, err = e.GetOrderInfo(config.OrderSubmission.OrderID)
|
||||
r15, err = e.GetOrderInfo(config.OrderSubmission.OrderID, p, assetTypes[i])
|
||||
msg = ""
|
||||
if err != nil {
|
||||
msg = err.Error()
|
||||
|
||||
@@ -1231,7 +1231,7 @@ func getOrders(c *cli.Context) error {
|
||||
var getOrderCommand = cli.Command{
|
||||
Name: "getorder",
|
||||
Usage: "gets the specified order info",
|
||||
ArgsUsage: "<exchange> <order_id>",
|
||||
ArgsUsage: "<exchange> <order_id> <pair>",
|
||||
Action: getOrder,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
@@ -1242,6 +1242,10 @@ var getOrderCommand = cli.Command{
|
||||
Name: "order_id",
|
||||
Usage: "the order id to retrieve",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "pair",
|
||||
Usage: "the pair to retrieve",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1253,6 +1257,13 @@ func getOrder(c *cli.Context) error {
|
||||
|
||||
var exchangeName string
|
||||
var orderID string
|
||||
var currencyPair string
|
||||
|
||||
if c.IsSet("pair") {
|
||||
currencyPair = c.String("pair")
|
||||
} else {
|
||||
currencyPair = c.Args().Get(2)
|
||||
}
|
||||
|
||||
if c.IsSet("exchange") {
|
||||
exchangeName = c.String("exchange")
|
||||
@@ -1260,6 +1271,15 @@ func getOrder(c *cli.Context) error {
|
||||
exchangeName = c.Args().First()
|
||||
}
|
||||
|
||||
if !validPair(currencyPair) {
|
||||
return errInvalidPair
|
||||
}
|
||||
|
||||
p, err := currency.NewPairDelimiter(currencyPair, pairDelimiter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !validExchange(exchangeName) {
|
||||
return errInvalidExchange
|
||||
}
|
||||
@@ -1280,6 +1300,11 @@ func getOrder(c *cli.Context) error {
|
||||
result, err := client.GetOrder(context.Background(), &gctrpc.GetOrderRequest{
|
||||
Exchange: exchangeName,
|
||||
OrderId: orderID,
|
||||
Pair: &gctrpc.CurrencyPair{
|
||||
Delimiter: p.Delimiter,
|
||||
Base: p.Base.String(),
|
||||
Quote: p.Quote.String(),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -132,7 +132,7 @@ func (h *FakePassingExchange) CancelOrder(_ *order.Cancel) error { ret
|
||||
func (h *FakePassingExchange) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, error) {
|
||||
return order.CancelAllResponse{}, nil
|
||||
}
|
||||
func (h *FakePassingExchange) GetOrderInfo(_ string) (order.Detail, error) {
|
||||
func (h *FakePassingExchange) GetOrderInfo(_ string, _ currency.Pair, _ asset.Item) (order.Detail, error) {
|
||||
return order.Detail{}, nil
|
||||
}
|
||||
func (h *FakePassingExchange) GetDepositAddress(_ currency.Code, _ string) (string, error) {
|
||||
|
||||
@@ -804,7 +804,14 @@ func (s *RPCServer) GetOrder(_ context.Context, r *gctrpc.GetOrderRequest) (*gct
|
||||
if exch == nil {
|
||||
return nil, errExchangeNotLoaded
|
||||
}
|
||||
result, err := exch.GetOrderInfo(r.OrderId)
|
||||
|
||||
pair := currency.Pair{
|
||||
Delimiter: r.Pair.Delimiter,
|
||||
Base: currency.NewCode(r.Pair.Base),
|
||||
Quote: currency.NewCode(r.Pair.Quote),
|
||||
}
|
||||
|
||||
result, err := exch.GetOrderInfo(r.OrderId, pair, "") // assetType will be implemented in the future
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error whilst trying to retrieve info for order %s: %s", r.OrderId, err)
|
||||
}
|
||||
@@ -836,6 +843,8 @@ func (s *RPCServer) GetOrder(_ context.Context, r *gctrpc.GetOrderRequest) (*gct
|
||||
OpenVolume: result.RemainingAmount,
|
||||
Fee: result.Fee,
|
||||
Trades: trades,
|
||||
Cost: result.Cost,
|
||||
UpdateTime: result.CloseTime.Unix(),
|
||||
}, err
|
||||
}
|
||||
|
||||
@@ -873,9 +882,20 @@ func (s *RPCServer) SubmitOrder(_ context.Context, r *gctrpc.SubmitOrderRequest)
|
||||
return &gctrpc.SubmitOrderResponse{}, err
|
||||
}
|
||||
|
||||
var trades []*gctrpc.Trades
|
||||
for i := range resp.Trades {
|
||||
trades = append(trades, &gctrpc.Trades{
|
||||
Amount: resp.Trades[i].Amount,
|
||||
Price: resp.Trades[i].Price,
|
||||
Fee: resp.Trades[i].Fee,
|
||||
FeeAsset: resp.Trades[i].FeeAsset,
|
||||
})
|
||||
}
|
||||
|
||||
return &gctrpc.SubmitOrderResponse{
|
||||
OrderId: resp.OrderID,
|
||||
OrderPlaced: resp.IsOrderPlaced,
|
||||
Trades: trades,
|
||||
}, err
|
||||
}
|
||||
|
||||
|
||||
@@ -269,8 +269,8 @@ func (a *Alphapoint) CancelAllOrders(orderCancellation *order.Cancel) (order.Can
|
||||
a.CancelAllExistingOrders(orderCancellation.AccountID)
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (a *Alphapoint) GetOrderInfo(orderID string) (float64, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (a *Alphapoint) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (float64, error) {
|
||||
orders, err := a.GetOrders()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
||||
@@ -45,6 +45,7 @@ const (
|
||||
queryOrder = "/api/v3/order"
|
||||
openOrders = "/api/v3/openOrders"
|
||||
allOrders = "/api/v3/allOrders"
|
||||
myTrades = "/api/v3/myTrades"
|
||||
|
||||
// Withdraw API endpoints
|
||||
withdrawEndpoint = "/wapi/v3/withdraw.html"
|
||||
|
||||
@@ -328,22 +328,26 @@ type CancelOrderResponse struct {
|
||||
|
||||
// QueryOrderData holds query order data
|
||||
type QueryOrderData struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Symbol string `json:"symbol"`
|
||||
OrderID int64 `json:"orderId"`
|
||||
ClientOrderID string `json:"clientOrderId"`
|
||||
Price float64 `json:"price,string"`
|
||||
OrigQty float64 `json:"origQty,string"`
|
||||
ExecutedQty float64 `json:"executedQty,string"`
|
||||
Status string `json:"status"`
|
||||
TimeInForce string `json:"timeInForce"`
|
||||
Type string `json:"type"`
|
||||
Side string `json:"side"`
|
||||
StopPrice float64 `json:"stopPrice,string"`
|
||||
IcebergQty float64 `json:"icebergQty,string"`
|
||||
Time float64 `json:"time"`
|
||||
IsWorking bool `json:"isWorking"`
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Symbol string `json:"symbol"`
|
||||
OrderID int64 `json:"orderId"`
|
||||
ClientOrderID string `json:"clientOrderId"`
|
||||
Price float64 `json:"price,string"`
|
||||
OrigQty float64 `json:"origQty,string"`
|
||||
ExecutedQty float64 `json:"executedQty,string"`
|
||||
Status string `json:"status"`
|
||||
TimeInForce string `json:"timeInForce"`
|
||||
Type string `json:"type"`
|
||||
Side string `json:"side"`
|
||||
StopPrice float64 `json:"stopPrice,string"`
|
||||
IcebergQty float64 `json:"icebergQty,string"`
|
||||
Time float64 `json:"time"`
|
||||
IsWorking bool `json:"isWorking"`
|
||||
CummulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"`
|
||||
OrderListID int64 `json:"orderListId"`
|
||||
OrigQuoteOrderQty float64 `json:"origQuoteOrderQty,string"`
|
||||
UpdateTime int64 `json:"updateTime"`
|
||||
}
|
||||
|
||||
// Balance holds query order data
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/thrasher-corp/gocryptotrader/common"
|
||||
"github.com/thrasher-corp/gocryptotrader/common/convert"
|
||||
"github.com/thrasher-corp/gocryptotrader/config"
|
||||
"github.com/thrasher-corp/gocryptotrader/currency"
|
||||
exchange "github.com/thrasher-corp/gocryptotrader/exchanges"
|
||||
@@ -513,9 +514,11 @@ func (b *Binance) SubmitOrder(s *order.Submit) (order.SubmitResponse, error) {
|
||||
sideType = order.Sell.String()
|
||||
}
|
||||
|
||||
timeInForce := BinanceRequestParamsTimeGTC
|
||||
var requestParamsOrderType RequestParamsOrderType
|
||||
switch s.Type {
|
||||
case order.Market:
|
||||
timeInForce = ""
|
||||
requestParamsOrderType = BinanceRequestParamsOrderMarket
|
||||
case order.Limit:
|
||||
requestParamsOrderType = BinanceRequestParamsOrderLimit
|
||||
@@ -530,13 +533,14 @@ func (b *Binance) SubmitOrder(s *order.Submit) (order.SubmitResponse, error) {
|
||||
Price: s.Price,
|
||||
Quantity: s.Amount,
|
||||
TradeType: requestParamsOrderType,
|
||||
TimeInForce: BinanceRequestParamsTimeGTC,
|
||||
TimeInForce: timeInForce,
|
||||
}
|
||||
|
||||
response, err := b.NewOrder(&orderRequest)
|
||||
if err != nil {
|
||||
return submitOrderResponse, err
|
||||
}
|
||||
|
||||
if response.OrderID > 0 {
|
||||
submitOrderResponse.OrderID = strconv.FormatInt(response.OrderID, 10)
|
||||
}
|
||||
@@ -545,6 +549,15 @@ func (b *Binance) SubmitOrder(s *order.Submit) (order.SubmitResponse, error) {
|
||||
}
|
||||
submitOrderResponse.IsOrderPlaced = true
|
||||
|
||||
for i := range response.Fills {
|
||||
submitOrderResponse.Trades = append(submitOrderResponse.Trades, order.TradeHistory{
|
||||
Price: response.Fills[i].Price,
|
||||
Amount: response.Fills[i].Qty,
|
||||
Fee: response.Fills[i].Commission,
|
||||
FeeAsset: response.Fills[i].CommissionAsset,
|
||||
})
|
||||
}
|
||||
|
||||
return submitOrderResponse, nil
|
||||
}
|
||||
|
||||
@@ -598,10 +611,63 @@ func (b *Binance) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, err
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *Binance) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *Binance) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (o order.Detail, err error) {
|
||||
if assetType == "" {
|
||||
assetType = asset.Spot
|
||||
}
|
||||
|
||||
formattedPair, err := b.FormatExchangeCurrency(pair, assetType)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
orderIDInt64, err := convert.Int64FromString(orderID)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := b.QueryOrder(formattedPair.String(), "", orderIDInt64)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
orderSide := order.Side(resp.Side)
|
||||
orderDate, err := convert.TimeFromUnixTimestampFloat(resp.Time)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
orderCloseDate, err := convert.TimeFromUnixTimestampFloat(float64(resp.UpdateTime))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
status, err := order.StringToOrderStatus(resp.Status)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
orderType := order.Limit
|
||||
if resp.Type == "MARKET" {
|
||||
orderType = order.Market
|
||||
}
|
||||
|
||||
return order.Detail{
|
||||
Amount: resp.OrigQty,
|
||||
Date: orderDate,
|
||||
Exchange: b.Name,
|
||||
ID: strconv.FormatInt(resp.OrderID, 10),
|
||||
Side: orderSide,
|
||||
Type: orderType,
|
||||
Pair: formattedPair,
|
||||
Cost: resp.CummulativeQuoteQty,
|
||||
AssetType: assetType,
|
||||
CloseTime: orderCloseDate,
|
||||
Status: status,
|
||||
Price: resp.Price,
|
||||
ExecutedAmount: resp.ExecutedQty,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// GetDepositAddress returns a deposit address for a specified currency
|
||||
@@ -676,7 +742,10 @@ func (b *Binance) GetActiveOrders(req *order.GetOrdersRequest) ([]order.Detail,
|
||||
for i := range resp {
|
||||
orderSide := order.Side(strings.ToUpper(resp[i].Side))
|
||||
orderType := order.Type(strings.ToUpper(resp[i].Type))
|
||||
orderDate := time.Unix(0, int64(resp[i].Time)*int64(time.Millisecond))
|
||||
orderDate, err := convert.TimeFromUnixTimestampFloat(resp[i].Time)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pair, err := currency.NewPairFromString(resp[i].Symbol)
|
||||
if err != nil {
|
||||
@@ -730,7 +799,10 @@ func (b *Binance) GetOrderHistory(req *order.GetOrdersRequest) ([]order.Detail,
|
||||
for i := range resp {
|
||||
orderSide := order.Side(strings.ToUpper(resp[i].Side))
|
||||
orderType := order.Type(strings.ToUpper(resp[i].Type))
|
||||
orderDate := time.Unix(0, int64(resp[i].Time)*int64(time.Millisecond))
|
||||
orderDate, err := convert.TimeFromUnixTimestampFloat(resp[i].Time)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// New orders are covered in GetOpenOrders
|
||||
if resp[i].Status == "NEW" {
|
||||
continue
|
||||
|
||||
@@ -583,8 +583,8 @@ func (b *Bitfinex) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, er
|
||||
return order.CancelAllResponse{}, err
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *Bitfinex) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *Bitfinex) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -309,8 +309,8 @@ func (b *Bitflyer) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, er
|
||||
return order.CancelAllResponse{}, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *Bitflyer) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *Bitflyer) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -444,8 +444,8 @@ func (b *Bithumb) CancelAllOrders(orderCancellation *order.Cancel) (order.Cancel
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *Bithumb) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *Bithumb) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -505,8 +505,8 @@ func (b *Bitmex) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, erro
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *Bitmex) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *Bitmex) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -442,8 +442,8 @@ func (b *Bitstamp) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, er
|
||||
return order.CancelAllResponse{}, err
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *Bitstamp) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *Bitstamp) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -448,8 +448,8 @@ func (b *Bittrex) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, err
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *Bittrex) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *Bittrex) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -502,8 +502,8 @@ func (b *BTCMarkets) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse,
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *BTCMarkets) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *BTCMarkets) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var resp order.Detail
|
||||
o, err := b.FetchOrder(orderID)
|
||||
if err != nil {
|
||||
|
||||
@@ -541,8 +541,8 @@ func orderIntToType(i int) order.Type {
|
||||
return order.UnknownType
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (b *BTSE) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (b *BTSE) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
o, err := b.GetOrders("", orderID, "")
|
||||
if err != nil {
|
||||
return order.Detail{}, err
|
||||
@@ -594,8 +594,7 @@ func (b *BTSE) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
"", orderID)
|
||||
if err != nil {
|
||||
return od,
|
||||
fmt.Errorf("unable to get order fills for orderID %s",
|
||||
orderID)
|
||||
fmt.Errorf("unable to get order fills for orderID %s", orderID)
|
||||
}
|
||||
|
||||
for i := range th {
|
||||
|
||||
@@ -515,8 +515,8 @@ func (c *CoinbasePro) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse,
|
||||
return order.CancelAllResponse{}, err
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (c *CoinbasePro) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (c *CoinbasePro) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
genOrderDetail, errGo := c.GetOrder(orderID)
|
||||
if errGo != nil {
|
||||
return order.Detail{}, fmt.Errorf("error retrieving order %s : %s", orderID, errGo)
|
||||
|
||||
@@ -589,8 +589,8 @@ func (c *Coinbene) CancelAllOrders(orderCancellation *order.Cancel) (order.Cance
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (c *Coinbene) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (c *Coinbene) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var resp order.Detail
|
||||
tempResp, err := c.FetchSpotOrderInfo(orderID)
|
||||
if err != nil {
|
||||
|
||||
@@ -718,8 +718,8 @@ func (c *COINUT) CancelAllOrders(details *order.Cancel) (order.CancelAllResponse
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (c *COINUT) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (c *COINUT) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
return order.Detail{}, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
|
||||
@@ -444,8 +444,8 @@ func (e *EXMO) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, error)
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (e *EXMO) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (e *EXMO) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -644,8 +644,8 @@ func (s *OrderData) GetCompatible(f *FTX) (OrderVars, error) {
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (f *FTX) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (f *FTX) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var resp order.Detail
|
||||
orderData, err := f.GetOrderStatus(orderID)
|
||||
if err != nil {
|
||||
@@ -655,7 +655,7 @@ func (f *FTX) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
assetType, err := f.GetPairAssetType(p)
|
||||
orderAssetType, err := f.GetPairAssetType(p)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
@@ -666,7 +666,7 @@ func (f *FTX) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
resp.Exchange = f.Name
|
||||
resp.ExecutedAmount = orderData.Size - orderData.RemainingSize
|
||||
resp.Pair = p
|
||||
resp.AssetType = assetType
|
||||
resp.AssetType = orderAssetType
|
||||
resp.Price = orderData.Price
|
||||
resp.RemainingAmount = orderData.RemainingSize
|
||||
orderVars, err := orderData.GetCompatible(f)
|
||||
|
||||
@@ -477,7 +477,7 @@ func TestGetOrderInfo(t *testing.T) {
|
||||
t.Skip("no API keys set skipping test")
|
||||
}
|
||||
|
||||
_, err := g.GetOrderInfo("917591554")
|
||||
_, err := g.GetOrderInfo("917591554", currency.Pair{}, asset.Spot)
|
||||
if err != nil {
|
||||
if err.Error() != "no order found with id 917591554" && err.Error() != "failed to get open orders" {
|
||||
t.Fatalf("GetOrderInfo() returned an error skipping test: %v", err)
|
||||
|
||||
@@ -508,15 +508,19 @@ func (g *Gateio) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, erro
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (g *Gateio) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (g *Gateio) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
orders, err := g.GetOpenOrders("")
|
||||
if err != nil {
|
||||
return orderDetail, errors.New("failed to get open orders")
|
||||
}
|
||||
|
||||
format, err := g.GetPairFormat(asset.Spot, false)
|
||||
if assetType == "" {
|
||||
assetType = asset.Spot
|
||||
}
|
||||
|
||||
format, err := g.GetPairFormat(assetType, false)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
|
||||
@@ -385,8 +385,8 @@ func (g *Gemini) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, erro
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (g *Gemini) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (g *Gemini) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -536,8 +536,8 @@ func (h *HitBTC) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, erro
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (h *HitBTC) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (h *HitBTC) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -659,8 +659,8 @@ func (h *HUOBI) CancelAllOrders(orderCancellation *order.Cancel) (order.CancelAl
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (h *HUOBI) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (h *HUOBI) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
var respData *OrderInfo
|
||||
if h.Websocket.CanUseAuthenticatedWebsocketForWrapper() {
|
||||
@@ -685,7 +685,8 @@ func (h *HUOBI) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
}
|
||||
var responseID = strconv.FormatInt(respData.ID, 10)
|
||||
if responseID != orderID {
|
||||
return orderDetail, errors.New(h.Name + " - GetOrderInfo orderID mismatch. Expected: " + orderID + " Received: " + responseID)
|
||||
return orderDetail, errors.New(h.Name + " - GetOrderInfo orderID mismatch. Expected: " +
|
||||
orderID + " Received: " + responseID)
|
||||
}
|
||||
typeDetails := strings.Split(respData.Type, "-")
|
||||
orderSide, err := order.StringToOrderSide(typeDetails[0])
|
||||
|
||||
@@ -52,7 +52,7 @@ type IBotExchange interface {
|
||||
ModifyOrder(action *order.Modify) (string, error)
|
||||
CancelOrder(o *order.Cancel) error
|
||||
CancelAllOrders(orders *order.Cancel) (order.CancelAllResponse, error)
|
||||
GetOrderInfo(orderID string) (order.Detail, error)
|
||||
GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error)
|
||||
GetDepositAddress(cryptocurrency currency.Code, accountID string) (string, error)
|
||||
GetOrderHistory(getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error)
|
||||
GetActiveOrders(getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error)
|
||||
|
||||
@@ -400,8 +400,8 @@ func (i *ItBit) CancelAllOrders(orderCancellation *order.Cancel) (order.CancelAl
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (i *ItBit) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (i *ItBit) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ func TestGetOrderInfo(t *testing.T) {
|
||||
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
|
||||
}
|
||||
|
||||
_, err := k.GetOrderInfo("OZPTPJ-HVYHF-EDIGXS")
|
||||
_, err := k.GetOrderInfo("OZPTPJ-HVYHF-EDIGXS", currency.Pair{}, asset.Spot)
|
||||
if !areTestAPIKeysSet() && err == nil {
|
||||
t.Error("Expecting error")
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package kraken
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -608,67 +609,75 @@ func (k *Kraken) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, erro
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (k *Kraken) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (k *Kraken) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
var emptyOrderOptions OrderInfoOptions
|
||||
openOrders, err := k.GetOpenOrders(emptyOrderOptions)
|
||||
resp, err := k.QueryOrdersInfo(OrderInfoOptions{
|
||||
Trades: true,
|
||||
}, orderID)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
if orderInfo, ok := openOrders.Open[orderID]; ok {
|
||||
avail, err := k.GetAvailablePairs(asset.Spot)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
|
||||
fmt, err := k.GetPairFormat(asset.Spot, false)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
orderInfo, ok := resp[orderID]
|
||||
if !ok {
|
||||
return orderDetail, fmt.Errorf("order %s not found in response", orderID)
|
||||
}
|
||||
|
||||
var trades []order.TradeHistory
|
||||
for i := range orderInfo.Trades {
|
||||
trades = append(trades, order.TradeHistory{
|
||||
TID: orderInfo.Trades[i],
|
||||
})
|
||||
}
|
||||
side, err := order.StringToOrderSide(orderInfo.Description.Type)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
status, err := order.StringToOrderStatus(orderInfo.Status)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
oType, err := order.StringToOrderType(orderInfo.Description.OrderType)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
if assetType == "" {
|
||||
assetType = asset.Spot
|
||||
}
|
||||
|
||||
p, err := currency.NewPairFromFormattedPairs(orderInfo.Description.Pair,
|
||||
avail,
|
||||
fmt)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
orderDetail = order.Detail{
|
||||
Exchange: k.Name,
|
||||
ID: orderID,
|
||||
Pair: p,
|
||||
Side: side,
|
||||
Type: oType,
|
||||
Date: convert.TimeFromUnixTimestampDecimal(orderInfo.OpenTime),
|
||||
Status: status,
|
||||
Price: orderInfo.Price,
|
||||
Amount: orderInfo.Volume,
|
||||
ExecutedAmount: orderInfo.VolumeExecuted,
|
||||
RemainingAmount: orderInfo.Volume - orderInfo.VolumeExecuted,
|
||||
Fee: orderInfo.Fee,
|
||||
Trades: trades,
|
||||
}
|
||||
} else {
|
||||
return orderDetail, errors.New(k.Name + " - Order ID not found: " + orderID)
|
||||
avail, err := k.GetAvailablePairs(assetType)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
|
||||
format, err := k.GetPairFormat(assetType, true)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
|
||||
var trades []order.TradeHistory
|
||||
for i := range orderInfo.Trades {
|
||||
trades = append(trades, order.TradeHistory{
|
||||
TID: orderInfo.Trades[i],
|
||||
})
|
||||
}
|
||||
side, err := order.StringToOrderSide(orderInfo.Description.Type)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
status, err := order.StringToOrderStatus(orderInfo.Status)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
oType, err := order.StringToOrderType(orderInfo.Description.OrderType)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
|
||||
p, err := currency.NewPairFromFormattedPairs(orderInfo.Description.Pair,
|
||||
avail,
|
||||
format)
|
||||
if err != nil {
|
||||
return orderDetail, err
|
||||
}
|
||||
orderDetail = order.Detail{
|
||||
Exchange: k.Name,
|
||||
ID: orderID,
|
||||
Pair: p,
|
||||
Side: side,
|
||||
Type: oType,
|
||||
Date: convert.TimeFromUnixTimestampDecimal(orderInfo.OpenTime),
|
||||
CloseTime: convert.TimeFromUnixTimestampDecimal(orderInfo.CloseTime),
|
||||
Status: status,
|
||||
Price: orderInfo.Price,
|
||||
Amount: orderInfo.Volume,
|
||||
ExecutedAmount: orderInfo.VolumeExecuted,
|
||||
RemainingAmount: orderInfo.Volume - orderInfo.VolumeExecuted,
|
||||
Fee: orderInfo.Fee,
|
||||
Trades: trades,
|
||||
}
|
||||
|
||||
return orderDetail, nil
|
||||
|
||||
@@ -399,8 +399,8 @@ func (l *LakeBTC) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, err
|
||||
return cancelAllOrdersResponse, l.CancelExistingOrders(ordersToCancel)
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (l *LakeBTC) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (l *LakeBTC) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ func TestGetOrderInfo(t *testing.T) {
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
_, err := l.GetOrderInfo("9ead39f5-701a-400b-b635-d7349eb0f6b")
|
||||
_, err := l.GetOrderInfo("9ead39f5-701a-400b-b635-d7349eb0f6b", currency.Pair{}, asset.Spot)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
@@ -445,8 +445,8 @@ func (l *Lbank) CancelAllOrders(o *order.Cancel) (order.CancelAllResponse, error
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (l *Lbank) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (l *Lbank) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var resp order.Detail
|
||||
orderIDs, err := l.getAllOpenOrderID()
|
||||
if err != nil {
|
||||
|
||||
@@ -394,8 +394,8 @@ func (l *LocalBitcoins) CancelAllOrders(_ *order.Cancel) (order.CancelAllRespons
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (l *LocalBitcoins) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (l *LocalBitcoins) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -378,14 +378,18 @@ func (o *OKGroup) CancelAllOrders(orderCancellation *order.Cancel) (order.Cancel
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (o *OKGroup) GetOrderInfo(orderID string) (resp order.Detail, err error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (o *OKGroup) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (resp order.Detail, err error) {
|
||||
mOrder, err := o.GetSpotOrder(GetSpotOrderRequest{OrderID: orderID})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
format, err := o.GetPairFormat(asset.Spot, false)
|
||||
if assetType == "" {
|
||||
assetType = asset.Spot
|
||||
}
|
||||
|
||||
format, err := o.GetPairFormat(assetType, false)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
|
||||
@@ -64,6 +64,10 @@ type SubmitResponse struct {
|
||||
IsOrderPlaced bool
|
||||
FullyMatched bool
|
||||
OrderID string
|
||||
Rate float64
|
||||
Fee float64
|
||||
Cost float64
|
||||
Trades []TradeHistory
|
||||
}
|
||||
|
||||
// Modify contains all properties of an order
|
||||
@@ -124,6 +128,7 @@ type Detail struct {
|
||||
TargetAmount float64
|
||||
ExecutedAmount float64
|
||||
RemainingAmount float64
|
||||
Cost float64
|
||||
Fee float64
|
||||
Exchange string
|
||||
InternalOrderID string
|
||||
@@ -183,6 +188,7 @@ type TradeHistory struct {
|
||||
Side Side
|
||||
Timestamp time.Time
|
||||
IsMaker bool
|
||||
FeeAsset string
|
||||
}
|
||||
|
||||
// GetOrdersRequest used for GetOrderHistory and GetOpenOrders wrapper functions
|
||||
@@ -191,9 +197,11 @@ type GetOrdersRequest struct {
|
||||
Side Side
|
||||
StartTicks time.Time
|
||||
EndTicks time.Time
|
||||
OrderID string
|
||||
// Currencies Empty array = all currencies. Some endpoints only support
|
||||
// singular currency enquiries
|
||||
Pairs []currency.Pair
|
||||
Pairs []currency.Pair
|
||||
AssetType asset.Item
|
||||
}
|
||||
|
||||
// Status defines order status types
|
||||
@@ -216,6 +224,7 @@ const (
|
||||
Hidden Status = "HIDDEN"
|
||||
UnknownStatus Status = "UNKNOWN"
|
||||
Open Status = "OPEN"
|
||||
Closed Status = "CLOSED"
|
||||
)
|
||||
|
||||
// Type enforces a standard for order types across the code base
|
||||
|
||||
@@ -662,8 +662,12 @@ func StringToOrderStatus(status string) (Status, error) {
|
||||
return PartiallyCancelled, nil
|
||||
case strings.EqualFold(status, Open.String()):
|
||||
return Open, nil
|
||||
case strings.EqualFold(status, Closed.String()):
|
||||
return Closed, nil
|
||||
case strings.EqualFold(status, Cancelled.String()):
|
||||
return Cancelled, nil
|
||||
case strings.EqualFold(status, "CANCELED"): // Kraken case
|
||||
return Cancelled, nil
|
||||
case strings.EqualFold(status, PendingCancel.String()),
|
||||
strings.EqualFold(status, "pending cancel"),
|
||||
strings.EqualFold(status, "pending cancellation"):
|
||||
|
||||
@@ -503,8 +503,8 @@ func (p *Poloniex) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, er
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (p *Poloniex) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (p *Poloniex) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ func TestGetOpenOrders(t *testing.T) {
|
||||
|
||||
func TestGetOrderInfo(t *testing.T) {
|
||||
t.Parallel()
|
||||
_, err := y.GetOrderInfo("6196974")
|
||||
_, err := y.GetOrderInfo("6196974", currency.Pair{}, asset.Spot)
|
||||
if err == nil {
|
||||
t.Error("GetOrderInfo() Expected error")
|
||||
}
|
||||
|
||||
@@ -419,8 +419,8 @@ func (y *Yobit) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, error
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (y *Yobit) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (y *Yobit) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
@@ -540,8 +540,8 @@ func (z *ZB) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, error) {
|
||||
return cancelAllOrdersResponse, nil
|
||||
}
|
||||
|
||||
// GetOrderInfo returns information on a current open order
|
||||
func (z *ZB) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
// GetOrderInfo returns order information based on order ID
|
||||
func (z *ZB) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
|
||||
var orderDetail order.Detail
|
||||
return orderDetail, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
3499
gctrpc/rpc.pb.go
3499
gctrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
@@ -31,7 +30,6 @@ var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_GoCryptoTrader_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetInfoRequest
|
||||
@@ -2202,14 +2200,11 @@ func local_request_GoCryptoTrader_WebsocketSetURL_0(ctx context.Context, marshal
|
||||
// RegisterGoCryptoTraderHandlerServer registers the http handlers for service GoCryptoTrader to "mux".
|
||||
// UnaryRPC :call GoCryptoTraderServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGoCryptoTraderHandlerFromEndpoint instead.
|
||||
func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GoCryptoTraderServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2217,7 +2212,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2231,8 +2225,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetSubsystems_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2240,7 +2232,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetSubsystems_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2254,8 +2245,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_EnableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2263,7 +2252,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_EnableSubsystem_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2277,8 +2265,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_DisableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2286,7 +2272,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_DisableSubsystem_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2300,8 +2285,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetRPCEndpoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2309,7 +2292,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetRPCEndpoints_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2323,8 +2305,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetCommunicationRelayers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2332,7 +2312,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetCommunicationRelayers_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2346,8 +2325,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetExchanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2355,7 +2332,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetExchanges_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2369,8 +2345,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_DisableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2378,7 +2352,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_DisableExchange_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2392,8 +2365,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetExchangeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2401,7 +2372,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetExchangeInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2415,8 +2385,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetExchangeOTPCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2424,7 +2392,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetExchangeOTPCode_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2438,8 +2405,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetExchangeOTPCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2447,7 +2412,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetExchangeOTPCodes_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2461,8 +2425,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_EnableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2470,7 +2432,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_EnableExchange_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2484,8 +2445,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GetTicker_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2493,7 +2452,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetTicker_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2507,8 +2465,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetTickers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2516,7 +2472,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetTickers_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2530,8 +2485,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GetOrderbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2539,7 +2492,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetOrderbook_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2553,8 +2505,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetOrderbooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2562,7 +2512,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetOrderbooks_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2576,8 +2525,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2585,7 +2532,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetAccountInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2606,8 +2552,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2615,7 +2559,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetConfig_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2629,8 +2572,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetPortfolio_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2638,7 +2579,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetPortfolio_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2652,8 +2592,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetPortfolioSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2661,7 +2599,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetPortfolioSummary_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2675,8 +2612,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_AddPortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2684,7 +2619,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_AddPortfolioAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2698,8 +2632,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_RemovePortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2707,7 +2639,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_RemovePortfolioAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2721,8 +2652,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetForexProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2730,7 +2659,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetForexProviders_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2744,8 +2672,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetForexRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2753,7 +2679,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetForexRates_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2767,8 +2692,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GetOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2776,7 +2699,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetOrders_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2790,8 +2712,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GetOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2799,7 +2719,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetOrder_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2813,8 +2732,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_SubmitOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2822,7 +2739,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_SubmitOrder_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2836,8 +2752,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_SimulateOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2845,7 +2759,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_SimulateOrder_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2859,8 +2772,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_WhaleBomb_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2868,7 +2779,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WhaleBomb_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2882,8 +2792,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_CancelOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2891,7 +2799,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_CancelOrder_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2905,8 +2812,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_CancelAllOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2914,7 +2819,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_CancelAllOrders_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2928,8 +2832,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2937,7 +2839,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetEvents_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2951,8 +2852,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_AddEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2960,7 +2859,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_AddEvent_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2974,8 +2872,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_RemoveEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -2983,7 +2879,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_RemoveEvent_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -2997,8 +2892,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GetCryptocurrencyDepositAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3006,7 +2899,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetCryptocurrencyDepositAddresses_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3020,8 +2912,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GetCryptocurrencyDepositAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3029,7 +2919,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetCryptocurrencyDepositAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3043,8 +2932,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_WithdrawFiatFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3052,7 +2939,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WithdrawFiatFunds_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3066,8 +2952,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_WithdrawCryptocurrencyFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3075,7 +2959,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WithdrawCryptocurrencyFunds_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3089,8 +2972,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_WithdrawalEventByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3098,7 +2979,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WithdrawalEventByID_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3112,8 +2992,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_WithdrawalEventsByExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3121,7 +2999,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WithdrawalEventsByExchange_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3135,8 +3012,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_WithdrawalEventsByDate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3144,7 +3019,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WithdrawalEventsByDate_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3158,8 +3032,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3167,7 +3039,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetLoggerDetails_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3181,8 +3052,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_SetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3190,7 +3059,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_SetLoggerDetails_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3204,8 +3072,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GetExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3213,7 +3079,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetExchangePairs_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3227,8 +3092,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_SetExchangePair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3236,7 +3099,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_SetExchangePair_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3278,8 +3140,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetAuditEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3287,7 +3147,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetAuditEvent_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3301,8 +3160,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GCTScriptExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3310,7 +3167,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptExecute_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3324,8 +3180,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GCTScriptUpload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3333,7 +3187,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptUpload_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3347,8 +3200,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GCTScriptReadScript_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3356,7 +3207,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptReadScript_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3370,8 +3220,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GCTScriptStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3379,7 +3227,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptStatus_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3393,8 +3240,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GCTScriptQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3402,7 +3247,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptQuery_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3416,8 +3260,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GCTScriptStop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3425,7 +3267,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptStop_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3439,8 +3280,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GCTScriptStopAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3448,7 +3287,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptStopAll_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3462,8 +3300,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GCTScriptListAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3471,7 +3307,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptListAll_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3485,8 +3320,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("POST", pattern_GoCryptoTrader_GCTScriptAutoLoadToggle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3494,7 +3327,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GCTScriptAutoLoadToggle_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3508,8 +3340,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetHistoricCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3517,7 +3347,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetHistoricCandles_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3531,8 +3360,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_SetExchangeAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3540,7 +3367,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_SetExchangeAsset_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3554,8 +3380,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_SetAllExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3563,7 +3387,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_SetAllExchangePairs_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3577,8 +3400,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_UpdateExchangeSupportedPairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3586,7 +3407,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_UpdateExchangeSupportedPairs_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3600,8 +3420,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_GetExchangeAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3609,7 +3427,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_GetExchangeAssets_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3623,8 +3440,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_WebsocketGetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3632,7 +3447,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WebsocketGetInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3646,8 +3460,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_WebsocketSetEnabled_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3655,7 +3467,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WebsocketSetEnabled_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3669,8 +3480,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_WebsocketGetSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3678,7 +3487,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WebsocketGetSubscriptions_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3692,8 +3500,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_WebsocketSetProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3701,7 +3507,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WebsocketSetProxy_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -3715,8 +3520,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
mux.Handle("GET", pattern_GoCryptoTrader_WebsocketSetURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -3724,7 +3527,6 @@ func RegisterGoCryptoTraderHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_GoCryptoTrader_WebsocketSetURL_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
||||
@@ -283,18 +283,21 @@ message GetForexRatesResponse {
|
||||
message OrderDetails {
|
||||
string exchange = 1;
|
||||
string id = 2;
|
||||
string base_currency = 3;
|
||||
string quote_currency = 4;
|
||||
string asset_type = 5;
|
||||
string order_side = 6;
|
||||
string order_type = 7;
|
||||
int64 creation_time = 8;
|
||||
string status = 9;
|
||||
double price = 10;
|
||||
double amount = 11;
|
||||
double open_volume = 12;
|
||||
double fee = 13;
|
||||
repeated TradeHistory trades = 14;
|
||||
string client_order_id = 3;
|
||||
string base_currency = 4;
|
||||
string quote_currency = 5;
|
||||
string asset_type = 6;
|
||||
string order_side = 7;
|
||||
string order_type = 8;
|
||||
int64 creation_time = 9;
|
||||
int64 update_time = 10;
|
||||
string status = 11;
|
||||
double price = 12;
|
||||
double amount = 13;
|
||||
double open_volume = 14;
|
||||
double fee = 15;
|
||||
double cost = 16;
|
||||
repeated TradeHistory trades = 17;
|
||||
}
|
||||
|
||||
message TradeHistory {
|
||||
@@ -321,6 +324,7 @@ message GetOrdersResponse {
|
||||
message GetOrderRequest {
|
||||
string exchange = 1;
|
||||
string order_id = 2;
|
||||
CurrencyPair pair = 3;
|
||||
}
|
||||
|
||||
message SubmitOrderRequest {
|
||||
@@ -334,9 +338,17 @@ message SubmitOrderRequest {
|
||||
string asset_type = 8;
|
||||
}
|
||||
|
||||
message Trades {
|
||||
double amount = 1;
|
||||
double price = 2;
|
||||
double fee = 3;
|
||||
string fee_asset = 4;
|
||||
}
|
||||
|
||||
message SubmitOrderResponse {
|
||||
bool order_placed = 1;
|
||||
string order_id = 2;
|
||||
repeated Trades trades= 3;
|
||||
}
|
||||
|
||||
message SimulateOrderRequest {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -86,7 +86,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -118,7 +118,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -150,7 +150,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -182,7 +182,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -212,7 +212,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -244,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -274,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -306,7 +306,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -354,7 +354,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -402,7 +402,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -434,7 +434,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -456,7 +456,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -488,7 +488,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -520,7 +520,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -559,7 +559,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -589,7 +589,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -645,7 +645,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -667,7 +667,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -689,7 +689,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -721,7 +721,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -753,7 +753,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -775,7 +775,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -805,7 +805,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -844,7 +844,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -874,7 +874,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -904,7 +904,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -926,7 +926,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -958,7 +958,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -969,7 +969,8 @@
|
||||
"name": "enabled",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -997,7 +998,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1027,7 +1028,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1049,7 +1050,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1071,7 +1072,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1133,19 +1134,22 @@
|
||||
"name": "ex_request",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "sync",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "use_db",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -1164,7 +1168,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1186,7 +1190,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1216,7 +1220,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1248,7 +1252,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1280,7 +1284,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1311,7 +1315,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1365,7 +1369,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1397,7 +1401,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1419,7 +1423,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1441,7 +1445,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1463,7 +1467,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1485,7 +1489,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1517,7 +1521,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1548,7 +1552,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1602,7 +1606,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1634,7 +1638,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1666,7 +1670,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1683,7 +1687,8 @@
|
||||
"name": "enable",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -1702,7 +1707,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1725,7 +1730,8 @@
|
||||
"name": "enable",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -1744,7 +1750,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1776,7 +1782,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1808,7 +1814,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1840,7 +1846,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1872,7 +1878,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1902,7 +1908,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1932,7 +1938,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1962,7 +1968,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -1979,7 +1985,8 @@
|
||||
"name": "enable",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -1998,7 +2005,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -2034,7 +2041,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -2070,7 +2077,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -2102,7 +2109,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -2134,7 +2141,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -2166,7 +2173,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -2198,7 +2205,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
@@ -2317,7 +2324,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"cold_storage": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2435,10 +2443,12 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"connected": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2453,10 +2463,12 @@
|
||||
"format": "double"
|
||||
},
|
||||
"check_bids": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"check_bids_and_asks": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"orderbook_amount": {
|
||||
"type": "number",
|
||||
@@ -2523,10 +2535,12 @@
|
||||
"type": "string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"verbose": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"rest_polling_delay": {
|
||||
"type": "string"
|
||||
@@ -2539,7 +2553,8 @@
|
||||
"format": "int64"
|
||||
},
|
||||
"primary_provider": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2586,7 +2601,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2654,10 +2670,12 @@
|
||||
"format": "byte"
|
||||
},
|
||||
"archived": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"overwrite": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2786,7 +2804,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"executed": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2805,13 +2824,16 @@
|
||||
"type": "string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"verbose": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"using_sandbox": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"http_timeout": {
|
||||
"type": "string"
|
||||
@@ -2832,7 +2854,8 @@
|
||||
}
|
||||
},
|
||||
"authenticated_api": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2958,7 +2981,8 @@
|
||||
"subsystem_status": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
},
|
||||
"rpc_endpoints": {
|
||||
@@ -2973,16 +2997,20 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"info": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"debug": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"warn": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"error": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2994,6 +3022,9 @@
|
||||
},
|
||||
"order_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"pair": {
|
||||
"$ref": "#/definitions/gctrpcCurrencyPair"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3110,7 +3141,8 @@
|
||||
"subsystems_status": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3200,6 +3232,9 @@
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"client_order_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"base_currency": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3219,6 +3254,10 @@
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3238,6 +3277,10 @@
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"cost": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"trades": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -3340,7 +3383,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"started": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"listen_address": {
|
||||
"type": "string"
|
||||
@@ -3386,7 +3430,8 @@
|
||||
}
|
||||
},
|
||||
"enable": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3484,10 +3529,17 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order_placed": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"order_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"trades": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gctrpcTrades"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3581,6 +3633,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcTrades": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"price": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"fee": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"fee_asset": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcWebsocketGetInfoResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3588,16 +3660,20 @@
|
||||
"type": "string"
|
||||
},
|
||||
"supported": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"authenticated_supported": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"authenticated": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"running_url": {
|
||||
"type": "string"
|
||||
|
||||
@@ -2,7 +2,7 @@ fmt := import("fmt")
|
||||
exch := import("exchange")
|
||||
|
||||
load := func() {
|
||||
info := exch.orderquery("BTC Markets", "4491600698")
|
||||
info := exch.orderquery("binance", "4491600698", "BTC-USDT", "spot")
|
||||
fmt.println(info)
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ func ExchangeAccountInfo(args ...objects.Object) (objects.Object, error) {
|
||||
|
||||
// ExchangeOrderQuery query order on exchange
|
||||
func ExchangeOrderQuery(args ...objects.Object) (objects.Object, error) {
|
||||
if len(args) != 2 {
|
||||
if len(args) < 2 {
|
||||
return nil, objects.ErrWrongNumArguments
|
||||
}
|
||||
|
||||
@@ -260,7 +260,36 @@ func ExchangeOrderQuery(args ...objects.Object) (objects.Object, error) {
|
||||
if !ok {
|
||||
return nil, fmt.Errorf(ErrParameterConvertFailed, orderID)
|
||||
}
|
||||
orderDetails, err := wrappers.GetWrapper().QueryOrder(exchangeName, orderID)
|
||||
|
||||
var pair currency.Pair
|
||||
assetTypeString := asset.Spot.String()
|
||||
|
||||
switch len(args) {
|
||||
case 4:
|
||||
assetTypeString, ok = objects.ToString(args[3])
|
||||
if !ok {
|
||||
return nil, fmt.Errorf(ErrParameterConvertFailed, assetTypeString)
|
||||
}
|
||||
fallthrough
|
||||
case 3:
|
||||
currencyPairString, isOk := objects.ToString(args[2])
|
||||
if !isOk {
|
||||
return nil, fmt.Errorf(ErrParameterConvertFailed, currencyPairString)
|
||||
}
|
||||
|
||||
var err error
|
||||
pair, err = currency.NewPairFromString(currencyPairString)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(ErrParameterConvertFailed, currencyPairString)
|
||||
}
|
||||
}
|
||||
|
||||
assetType, err := asset.New(assetTypeString)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
orderDetails, err := wrappers.GetWrapper().QueryOrder(exchangeName, orderID, pair, assetType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ type Exchange interface {
|
||||
Orderbook(exch string, pair currency.Pair, item asset.Item) (*orderbook.Base, error)
|
||||
Ticker(exch string, pair currency.Pair, item asset.Item) (*ticker.Price, error)
|
||||
Pairs(exch string, enabledOnly bool, item asset.Item) (*currency.Pairs, error)
|
||||
QueryOrder(exch, orderid string) (*order.Detail, error)
|
||||
QueryOrder(exch, orderid string, pair currency.Pair, assetType asset.Item) (*order.Detail, error)
|
||||
SubmitOrder(submit *order.Submit) (*order.SubmitResponse, error)
|
||||
CancelOrder(exch, orderid string) (bool, error)
|
||||
AccountInformation(exch string) (account.Holdings, error)
|
||||
|
||||
@@ -82,13 +82,13 @@ func (e Exchange) Pairs(exch string, enabledOnly bool, item asset.Item) (*curren
|
||||
}
|
||||
|
||||
// QueryOrder returns details of a valid exchange order
|
||||
func (e Exchange) QueryOrder(exch, orderID string) (*order.Detail, error) {
|
||||
func (e Exchange) QueryOrder(exch, orderID string, pair currency.Pair, assetType asset.Item) (*order.Detail, error) {
|
||||
ex, err := e.GetExchange(exch)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
r, err := ex.GetOrderInfo(orderID)
|
||||
r, err := ex.GetOrderInfo(orderID, pair, assetType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -108,7 +108,7 @@ func (e Exchange) SubmitOrder(submit *order.Submit) (*order.SubmitResponse, erro
|
||||
|
||||
// CancelOrder wrapper to cancel order on exchange
|
||||
func (e Exchange) CancelOrder(exch, orderID string) (bool, error) {
|
||||
orderDetails, err := e.QueryOrder(exch, orderID)
|
||||
orderDetails, err := e.QueryOrder(exch, orderID, currency.Pair{}, "")
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ func TestExchange_QueryOrder(t *testing.T) {
|
||||
if !configureExchangeKeys() {
|
||||
t.Skip("no exchange configured test skipped")
|
||||
}
|
||||
_, err := exchangeTest.QueryOrder(exchName, orderID)
|
||||
_, err := exchangeTest.QueryOrder(exchName, orderID, currency.Pair{}, assetType)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ func (w Wrapper) Pairs(exch string, _ bool, _ asset.Item) (*currency.Pairs, erro
|
||||
}
|
||||
|
||||
// QueryOrder validator for test execution/scripts
|
||||
func (w Wrapper) QueryOrder(exch, _ string) (*order.Detail, error) {
|
||||
func (w Wrapper) QueryOrder(exch, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error) {
|
||||
if exch == exchError.String() {
|
||||
return nil, errTestFailed
|
||||
}
|
||||
|
||||
@@ -137,12 +137,12 @@ func TestWrapper_Pairs(t *testing.T) {
|
||||
func TestWrapper_QueryOrder(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
_, err := testWrapper.QueryOrder(exchName, orderID)
|
||||
_, err := testWrapper.QueryOrder(exchName, orderID, currency.Pair{}, assetType)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
_, err = testWrapper.QueryOrder(exchError.String(), "")
|
||||
_, err = testWrapper.QueryOrder(exchError.String(), "", currency.Pair{}, assetType)
|
||||
if err == nil {
|
||||
t.Fatal("expected QueryOrder to return error on invalid name")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user