mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +00:00
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
@@ -293,7 +294,7 @@ func (c *COINUT) GetDerivativeInstruments(secType string) (interface{}, error) {
|
||||
}
|
||||
|
||||
// GetOptionChain returns option chain
|
||||
func (c *COINUT) GetOptionChain(asset, secType string, expiry int64) (OptionChainResponse, error) {
|
||||
func (c *COINUT) GetOptionChain(asset, secType string) (OptionChainResponse, error) {
|
||||
var result OptionChainResponse
|
||||
params := make(map[string]interface{})
|
||||
params["asset"] = asset
|
||||
@@ -368,7 +369,7 @@ func (c *COINUT) SendHTTPRequest(apiRequest string, params map[string]interface{
|
||||
headers["Content-Type"] = "application/json"
|
||||
|
||||
var rawMsg json.RawMessage
|
||||
err = c.SendPayload("POST", c.APIUrl, headers, bytes.NewBuffer(payload), &rawMsg, authenticated, c.Verbose)
|
||||
err = c.SendPayload(http.MethodPost, c.APIUrl, headers, bytes.NewBuffer(payload), &rawMsg, authenticated, c.Verbose)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ func (c *COINUT) CancelOrder(order exchange.OrderCancellation) error {
|
||||
}
|
||||
|
||||
// CancelAllOrders cancels all orders associated with a currency pair
|
||||
func (c *COINUT) CancelAllOrders(orderCancellation exchange.OrderCancellation) (exchange.CancelAllOrdersResponse, error) {
|
||||
func (c *COINUT) CancelAllOrders(_ exchange.OrderCancellation) (exchange.CancelAllOrdersResponse, error) {
|
||||
// TODO, this is a terrible implementation. Requires DB to improve
|
||||
// Coinut provides no way of retrieving orders without a currency
|
||||
// So we need to retrieve all currencies, then retrieve orders for each currency
|
||||
|
||||
Reference in New Issue
Block a user