func (c *APIClient) DeleteOrder(accountno int64, orderId int64) (res *OrderReply, err error) {
	res = &OrderReply{}
	err = c.Perform("DELETE", fmt.Sprintf("accounts/%d/orders/%d", accountno, orderId), nil, res)
	return
}
Delete an order.
package api
import (
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"sync"
	"time"
	. "github.com/denro/nordnet/util/models"
)
const (
	NNBASEURL     = `https: 
	NNTESTBASEURL = `https: 
	NNSERVICE     = `NEXTAPI`
	NNAPIVERSION  = `2`
)
var (
	TooManyRequestsError = errors.New("Too Many Requests, please wait for 10 seconds before trying again")
)
type APIError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}
func (e APIError) Error() string {
	return fmt.Sprintf("%v: %v", e.Code, e.Message)
}
type Params map[string]string
type APIClient struct {
	URL, Service, Version, Credentials, SessionKey string
	ExpiresAt, LastUsageAt                         time.Time
	http.Client
	sync.RWMutex
}
func NewAPIClient(credentials string) *APIClient {
	return &APIClient{
		URL:         NNBASEURL,
		Service:     NNSERVICE,
		Version:     NNAPIVERSION,
		Credentials: credentials,
	}
}
func NewAPITestClient(credentials string) *APIClient {
	return &APIClient{
		URL:         NNTESTBASEURL,
		Service:     NNSERVICE,
		Version:     NNAPIVERSION,
		Credentials: credentials,
	}
}
func (c *APIClient) SystemStatus() (res *SystemStatus, err error) {
	res = &SystemStatus{}
	err = c.Perform("GET", "", nil, res)
	return
}
func (c *APIClient) Accounts() (res []Account, err error) {
	res = []Account{}
	err = c.Perform("GET", "accounts", nil, &res)
	return
}
func (c *APIClient) Account(accountno int64) (res *AccountInfo, err error) {
	res = &AccountInfo{}
	err = c.Perform("GET", fmt.Sprintf("accounts/%d", accountno), nil, res)
	return
}
func (c *APIClient) AccountLedgers(accountno int64) (res []LedgerInformation, err error) {
	res = []LedgerInformation{}
	err = c.Perform("GET", fmt.Sprintf("accounts/%d/ledgers", accountno), nil, &res)
	return
}
func (c *APIClient) AccountOrders(accountno int64, params *Params) (res []Order, err error) {
	res = []Order{}
	err = c.Perform("GET", fmt.Sprintf("accounts/%d/orders", accountno), params, &res)
	return
}
func (c *APIClient) CreateOrder(accountno int64, params *Params) (res *OrderReply, err error) {
	res = &OrderReply{}
	err = c.Perform("POST", fmt.Sprintf("accounts/%d/orders", accountno), params, res)
	return
}
func (c *APIClient) ActivateOrder(accountno int64, orderId int64) (res *OrderReply, err error) {
	res = &OrderReply{}
	err = c.Perform("PUT", fmt.Sprintf("accounts/%d/orders/%d/activate", accountno, orderId), nil, res)
	return
}
func (c *APIClient) UpdateOrder(accountno int64, orderId int64, params *Params) (res *OrderReply, err error) {
	res = &OrderReply{}
	err = c.Perform("PUT", fmt.Sprintf("accounts/%d/orders/%d", accountno, orderId), params, res)
	return
}