Documentation
¶
Index ¶
- Constants
- type Balance
- type Client
- func (c *Client) AddCustomParam(k string, v string) *Client
- func (c *Client) Balance() ([]Balance, error)
- func (c *Client) Buy(o *OrderInput) (OrderResult, error)
- func (c *Client) CancelOrder() (bool, error)
- func (c *Client) Limit(v int) *Client
- func (c *Client) NewOrderClientID(v string) *Client
- func (c *Client) Offset(v int) *Client
- func (c *Client) OpenOrders() (OpenOrderResult, error)
- func (c *Client) OrderBook() (OrderBook, error)
- func (c *Client) OrderID(v int) *Client
- func (c *Client) OrderMethod(v string) *Client
- func (c *Client) PairSymbol(v string) *Client
- func (c *Client) Price(v float64) *Client
- func (c *Client) Quantity(v float64) *Client
- func (c *Client) Sell(o *OrderInput) (OrderResult, error)
- func (c *Client) SetAuthKey(publicKey, privateKey string)
- func (c *Client) SetBaseURL(basURL string) (err error)
- func (c *Client) Sort(v string) *Client
- func (c *Client) StopPrice(v float64) *Client
- func (c *Client) Ticker() ([]Ticker, error)
- func (c *Client) Trades() ([]Trade, error)
- func (c *Client) UserTransactions() ([]UserTransactions, error)
- func (c *Client) Version() string
- type GeneralResponse
- type OpenOrderModel
- type OpenOrderResult
- type OrderBook
- type OrderInput
- type OrderResult
- type Ticker
- type Trade
- type UserTransactions
Constants ¶
View Source
const ( BTCTRY string = "BTCTRY" ETHBTC string = "ETHBTC" ETHTRY string = "ETHTRY" XRPTRY string = "XRPTRY" LTCTRY string = "LTCTRY" USDTTRY string = "USDTTRY" BTCUSDT string = "BTCUSDT" ETHUSDT string = "ETHUSDT" XRPUSDT string = "XRPUSDT" LTCUSDT string = "LTCUSDT" XLMTRY string = "XLMTRY" LTCBTC string = "LTCBTC" XRPBTC string = "XRPBTC" XLMBTC string = "XLMBTC" XLMUSDT string = "XLMUSDT" NEOTRY string = "NEOTRY" NEOBTC string = "NEOBTC" NEOUSDT string = "NEOUSDT" EOSTRY string = "EOSTRY" EOSUSDT string = "EOSUSDT" EOSBTC string = "EOSBTC" DASHTRY string = "DASHTRY" DASHBTC string = "DASHBTC" DASHUSDT string = "DASHUSDT" LINKTRY string = "LINKTRY" LINKUSDT string = "LINKUSDT" LINKBTC string = "LINKBTC" ATOMTRY string = "ATOMTRY" ATOMUSDT string = "ATOMUSDT" ATOMBTC string = "ATOMBTC" XTZTRY string = "XTZTRY" TRY string = "TRY" BTC string = "BTC" ETH string = "ETH" XRP string = "XRP" LTC string = "LTC" USDT string = "USDT" XLM string = "XLM" NEO string = "NEO" EOS string = "EOS" DASH string = "DASH" LINK string = "LINK" ATOM string = "ATOM" XTZ string = "XTZ" MarketOrder string = "market" LimitOrder string = "limit" StopLimitOrder string = "stoplimit" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balance ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewBTCTurkClient ¶
func NewBTCTurkClient() *Client
func (*Client) AddCustomParam ¶
Custom Param
func (*Client) Buy ¶
func (c *Client) Buy(o *OrderInput) (OrderResult, error)
func (*Client) CancelOrder ¶
func (*Client) NewOrderClientID ¶
NewOrderClientID Buy or Sell
func (*Client) OpenOrders ¶
func (c *Client) OpenOrders() (OpenOrderResult, error)
func (*Client) OrderMethod ¶
OrderMethod Buy or Sell ( "limit", "market", "stoplimit" )
func (*Client) PairSymbol ¶
PairSymbol must be (Buy or Sell), Open Orders, Trades, Order Book
func (*Client) Sell ¶
func (c *Client) Sell(o *OrderInput) (OrderResult, error)
func (*Client) SetAuthKey ¶
func (*Client) SetBaseURL ¶
func (*Client) Ticker ¶
If pairSymbol is not set, ticker for all pairs will be returned in a json array. Or GET ?pairSymbol=BTC_TRY Or GET ?symbol=USDT
func (*Client) Trades ¶
GET ?pairSymbol=BTC_TRY or GET ?pairSymbol=BTC_TRY&last=COUNT (Max. value for count parameter is 50)
func (*Client) UserTransactions ¶
func (c *Client) UserTransactions() ([]UserTransactions, error)
Example Params : ?type=buy&type=sell&symbol=btc&symbol=try&symbol=usdt
type GeneralResponse ¶
type OpenOrderModel ¶
type OpenOrderModel struct { ID int64 `json:"id"` Price string `json:"price"` Amount string `json:"amount"` Quantity string `json:"quantity"` PairSymbol string `json:"pairsymbol"` Type string `json:"type"` Method string `json:"method"` OrderClientID string `json:"orderClientId"` DateTime float64 `json:"datetime"` UpdateTime float64 `json:"updateTime"` Status string `json:"status"` }
type OpenOrderResult ¶
type OpenOrderResult struct { Asks []OpenOrderModel `json:"asks"` Bids []OpenOrderModel `json:"bids"` }
type OrderBook ¶
type OrderInput ¶
type OrderResult ¶
type OrderResult struct { ID int32 `json:"id"` DateTime int32 `json:"datetime"` Type string `json:"type"` Method string `json:"method"` Price string `json:"price"` StopPrice string `json:"stopPrice"` Quantity string `json:"quantity"` PairSymbol string `json:"pairSymbol"` PairSymbolNormalized string `json:"pairSymbolNormalized"` NewOrderClientID string `json:"newOrderClientId"` }
type Ticker ¶
type Ticker struct { Pair string `json:"pair"` PairNormalized string `json:"pairNormalized"` Timestamp float64 `json:"timestamp"` Last float64 `json:"last"` High float64 `json:"high"` Low float64 `json:"low"` Bid float64 `json:"bid"` Ask float64 `json:"ask"` Open float64 `json:"open"` Volume float64 `json:"volume"` Average float64 `json:"average"` Daily float64 `json:"daily"` DailyPercent float64 `json:"dailyPercent"` DenominatorSymbol string `json:"denominatorSymbol"` NumeratorSymbol string `json:"numeratorSymbol"` }
type Trade ¶
type Trade struct { Pair string `json:"pair"` PairNormalized string `json:"pairNormalized"` Numerator string `json:"numerator"` Denominator string `json:"denominator"` TimeStamp float64 `json:"date"` TID string `json:"tid"` Price string `json:"price"` Amount string `json:"amount"` Side string `json:"side"` }
type UserTransactions ¶
type UserTransactions struct { Price float64 `json:"price"` NumeratorSymbol string `json:"numeratorSymbol"` DenominatorSymbol string `json:"denominatorSymbol"` OrderType string `json:"orderType"` ID string `json:"id"` Timestamp float64 `json:"timestamp"` Amount float64 `json:"amount"` Fee float64 `json:"fee"` Tax float64 `json:"tax"` }
Click to show internal directories.
Click to hide internal directories.