func (a *Alphapoint) GetTrades(currencyPair string, startIndex, count int) (Trades, error) {
	request := make(map[string]interface{})
	request["ins"] = currencyPair
	request["startIndex"] = startIndex
	request["Count"] = count
	response := Trades{}
	err := a.SendRequest("POST", alphapointTrades, request, &response)
	if err != nil {
		return response, err
	}
	if !response.IsAccepted {
		return response, errors.New(response.RejectReason)
	}
	return response, nil
}
GetTrades fetches past trades for the given currency pair
currencyPair: ie "BTCUSD"
StartIndex: specifies the index to begin from, -1 being the first trade on
AlphaPoint Exchange. To begin from the most recent trade, set startIndex to
0 (default: 0)
Count: specifies the number of trades to return (default: 10)
package alphapoint
import (
	"bytes"
	"errors"
	"fmt"
	"log"
	"strconv"
	"time"
	"github.com/gorilla/websocket"
	"github.com/mattkanwisher/cryptofiend/common"
	"github.com/mattkanwisher/cryptofiend/exchanges"
	"github.com/mattkanwisher/cryptofiend/exchanges/ticker"
)
const (
	alphapointDefaultAPIURL    = "https://sim3.alphapoint.com:8400"
	alphapointAPIVersion       = "1"
	alphapointTicker           = "GetTicker"
	alphapointTrades           = "GetTrades"
	alphapointTradesByDate     = "GetTradesByDate"
	alphapointOrderbook        = "GetOrderBook"
	alphapointProductPairs     = "GetProductPairs"
	alphapointProducts         = "GetProducts"
	alphapointCreateAccount    = "CreateAccount"
	alphapointUserInfo         = "GetUserInfo"
	alphapointAccountInfo      = "GetAccountInfo"
	alphapointAccountTrades    = "GetAccountTrades"
	alphapointDepositAddresses = "GetDepositAddresses"
	alphapointWithdraw         = "Withdraw"
	alphapointCreateOrder      = "CreateOrder"
	alphapointModifyOrder      = "ModifyOrder"
	alphapointCancelOrder      = "CancelOrder"
	alphapointCancelAllOrders  = "CancelAllOrders"
	alphapointOpenOrders       = "GetAccountOpenOrders"
	alphapointOrderFee         = "GetOrderFee"
	alphapointMaxRequestsPer10minutes = 500
)
type Alphapoint struct {
	exchange.Base
	WebsocketConn *websocket.Conn
}
func (a *Alphapoint) SetDefaults() {
	a.APIUrl = alphapointDefaultAPIURL
	a.WebsocketURL = alphapointDefaultWebsocketURL
	a.AssetTypes = []string{ticker.Spot}
}
func (a *Alphapoint) GetTicker(currencyPair string) (Ticker, error) {
	request := make(map[string]interface{})
	request["productPair"] = currencyPair
	response := Ticker{}
	err := a.SendRequest("POST", alphapointTicker, request, &response)
	if err != nil {
		return response, err
	}
	if !response.IsAccepted {
		return response, errors.New(response.RejectReason)
	}
	return response, nil
}