Documentation ¶
Index ¶
- type APIClient
- type AccountAPI
- func (api *AccountAPI) GetAccountBalanceByCCY(currency string) (*AccountBalance, error)
- func (api *AccountAPI) GetAccountBalances() ([]AccountBalance, error)
- func (api *AccountAPI) GetAccountInfo() (*AccountInfo, error)
- func (api *AccountAPI) GetDepositAddress(currency string) (*DepositAddress, error)
- type AccountBalance
- type AccountInfo
- type ClientCredentials
- type DepositAddress
- type HttpManager
- type HttpResponseAccountBalance
- type HttpResponseAccountBalances
- type HttpResponseAccountInfo
- type HttpResponseCancelOrder
- type HttpResponseGetCandles
- type HttpResponseGetDepositAddress
- type HttpResponseGetLastMarketPrice
- type HttpResponseGetMarketAvgPrice
- type HttpResponseGetMarketHistory
- type HttpResponseGetMarketSummaries
- type HttpResponseGetMarketTicker
- type HttpResponseGetMarketTicker24h
- type HttpResponseGetMarkets
- type HttpResponseGetOrderDetail
- type HttpResponseMarketOrders
- type HttpResponseMyOrders
- type HttpResponseOrderBook
- type HttpResponsePlaceOrder
- type MarketAPI
- func (api *MarketAPI) GetCandles(market string, resolution string, from, to int) ([]MarketCandle, error)
- func (api *MarketAPI) GetLastMarketPrice(market string) (*MarketPrice, error)
- func (api *MarketAPI) GetMarketBuyOrders(market string) ([]MarketOrder, error)
- func (api *MarketAPI) GetMarketCurrentAveragePrice(market string) (*MarketAvgPrice, error)
- func (api *MarketAPI) GetMarketOrderBook(market string, orderType string, limit int) (*OrderBookData, error)
- func (api *MarketAPI) GetMarketSellOrders(market string) ([]MarketOrder, error)
- func (api *MarketAPI) GetMarketSummaries() ([]MarketSummary, error)
- func (api *MarketAPI) GetMarketTicker(market string) (*MarketTicker, error)
- func (api *MarketAPI) GetMarketTicker24h(market string) (*MarketTicker24h, error)
- func (api *MarketAPI) GetMarkets() ([]MarketInfo, error)
- func (api *MarketAPI) GetRawCandles(market string, resolution string, from, to int) ([]MarketCandleRaw, error)
- func (api *MarketAPI) GetTradeHistory(market string, limit int) ([]MarketHistoryRecord, error)
- type MarketAvgPrice
- type MarketCandle
- type MarketCandleRaw
- type MarketDetail
- type MarketHistoryRecord
- type MarketInfo
- type MarketOrder
- type MarketOrderData
- type MarketPrice
- type MarketSummary
- type MarketTicker
- type MarketTicker24h
- type MyOrder
- type OrderAPI
- func (api *OrderAPI) CancelOrder(id int) (bool, error)
- func (api *OrderAPI) GetBuyOrderDetail(id int) (*OrderDetail, error)
- func (api *OrderAPI) GetMyBuyOrders(market string) ([]MyOrder, error)
- func (api *OrderAPI) GetMyOrders(market string) ([]MyOrder, error)
- func (api *OrderAPI) GetMyPendingBuyOrders(market string) ([]MyOrder, error)
- func (api *OrderAPI) GetMyPendingSellOrders(market string) ([]MyOrder, error)
- func (api *OrderAPI) GetMySellOrders(market string) ([]MyOrder, error)
- func (api *OrderAPI) GetSellOrderDetail(id int) (*OrderDetail, error)
- func (api *OrderAPI) PlaceLimitBuyOrder(market string, units, price float64) (*PlacedOrder, error)
- func (api *OrderAPI) PlaceLimitSellOrder(market string, units, price float64) (*PlacedOrder, error)
- func (api *OrderAPI) PlaceMarketBuyOrder(market string, units float64) (*PlacedOrder, error)
- func (api *OrderAPI) PlaceMarketSellOrder(market string, units float64) (*PlacedOrder, error)
- type OrderBookData
- type OrderDetail
- type OrderFill
- type PlacedOrder
- type TokenGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { AccountAPI *AccountAPI MarketAPI *MarketAPI OrderAPI *OrderAPI // contains filtered or unexported fields }
APIClient - APIClient struct
func NewAPIClient ¶
NewAPIClient - APIClient constructor
func NewAPIClientWithCredentials ¶
NewAPIClientWithCredentials - APIClient factory (create with params)
type AccountAPI ¶
type AccountAPI struct {
// contains filtered or unexported fields
}
AccountAPI - AccountAPI struct
func NewAccountAPI ¶
func NewAccountAPI(httpManager *HttpManager) *AccountAPI
NewAccountAPI - AccountAPI constructor
func (*AccountAPI) GetAccountBalanceByCCY ¶
func (api *AccountAPI) GetAccountBalanceByCCY(currency string) (*AccountBalance, error)
GetAccountBalanceByCCY - Use to retrieve the balance from your account for a specified currency. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_currency_balances
func (*AccountAPI) GetAccountBalances ¶
func (api *AccountAPI) GetAccountBalances() ([]AccountBalance, error)
GetAccountBalances - Use to retrieve all balances from your account. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_account_balances
func (*AccountAPI) GetAccountInfo ¶
func (api *AccountAPI) GetAccountInfo() (*AccountInfo, error)
GetAccountInfo - Use to get your account information. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_account_information
func (*AccountAPI) GetDepositAddress ¶
func (api *AccountAPI) GetDepositAddress(currency string) (*DepositAddress, error)
GetDepositAddress - Use to retrieve or generate an address for a specified currency. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_deposit_address
type AccountBalance ¶
type AccountInfo ¶
type ClientCredentials ¶
ClientCredentials - ClientCredentials struct
type DepositAddress ¶
type HttpManager ¶
type HttpManager struct {
// contains filtered or unexported fields
}
HttpManager - HttpManager struct
func NewHttpManager ¶
func NewHttpManager(apiBaseURL string) *HttpManager
NewHttpManager - HttpManager constructor
func (*HttpManager) SetCredentials ¶
func (m *HttpManager) SetCredentials(id, secret string) *HttpManager
SetCredentials - Set client's credentials (id + secret)
type HttpResponseAccountBalance ¶
type HttpResponseAccountBalance struct { Message string Status string Data *AccountBalance }
type HttpResponseAccountBalances ¶
type HttpResponseAccountBalances struct { Message string Status string Data []AccountBalance }
type HttpResponseAccountInfo ¶
type HttpResponseAccountInfo struct { Message string Status string Data *AccountInfo }
type HttpResponseCancelOrder ¶
type HttpResponseGetCandles ¶
type HttpResponseGetCandles struct { Message string Status string Data []MarketCandleRaw }
type HttpResponseGetDepositAddress ¶
type HttpResponseGetDepositAddress struct { Message string Status string Data *DepositAddress }
type HttpResponseGetLastMarketPrice ¶
type HttpResponseGetLastMarketPrice struct { Message string Status string Data *MarketPrice }
type HttpResponseGetMarketAvgPrice ¶
type HttpResponseGetMarketAvgPrice struct { Message string Status string Data *MarketAvgPrice }
type HttpResponseGetMarketHistory ¶
type HttpResponseGetMarketHistory struct { Message string Status string Data []MarketHistoryRecord }
type HttpResponseGetMarketSummaries ¶
type HttpResponseGetMarketSummaries struct { Message string Status string Data []MarketSummary }
type HttpResponseGetMarketTicker ¶
type HttpResponseGetMarketTicker struct { Message string Status string Data *MarketTicker }
type HttpResponseGetMarketTicker24h ¶
type HttpResponseGetMarketTicker24h struct { Message string Status string Data *MarketTicker24h }
type HttpResponseGetMarkets ¶
type HttpResponseGetMarkets struct { Message string Status string Data []MarketInfo }
type HttpResponseGetOrderDetail ¶
type HttpResponseGetOrderDetail struct { Message string Status string Data *OrderDetail }
type HttpResponseMarketOrders ¶
type HttpResponseMarketOrders struct { Message string Status string Data *MarketOrderData }
type HttpResponseMyOrders ¶
type HttpResponseOrderBook ¶
type HttpResponseOrderBook struct { Message string Status string Data *OrderBookData }
type HttpResponsePlaceOrder ¶
type HttpResponsePlaceOrder struct { Message string Status string Data *PlacedOrder }
type MarketAPI ¶
type MarketAPI struct {
// contains filtered or unexported fields
}
MarketAPI - MarketAPI struct
func NewMarketAPI ¶
func NewMarketAPI(httpManager *HttpManager) *MarketAPI
NewMarketAPI - MarketAPI constructor
func (*MarketAPI) GetCandles ¶
func (api *MarketAPI) GetCandles(market string, resolution string, from, to int) ([]MarketCandle, error)
GetCandles - The Candles endpoint provides chart candles for a specified time frame and period. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_candlestick
func (*MarketAPI) GetLastMarketPrice ¶
func (api *MarketAPI) GetLastMarketPrice(market string) (*MarketPrice, error)
GetLastMarketPrice - Get last price of the given market. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_last_market_price
func (*MarketAPI) GetMarketBuyOrders ¶
func (api *MarketAPI) GetMarketBuyOrders(market string) ([]MarketOrder, error)
GetMarketBuyOrders - Get all currently buy orders in Tokenize specified by market. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_market_buy_orders
func (*MarketAPI) GetMarketCurrentAveragePrice ¶
func (api *MarketAPI) GetMarketCurrentAveragePrice(market string) (*MarketAvgPrice, error)
GetMarketCurrentAveragePrice - Get the current average price for specified market. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_current_average_price
func (*MarketAPI) GetMarketOrderBook ¶
func (api *MarketAPI) GetMarketOrderBook(market string, orderType string, limit int) (*OrderBookData, error)
GetMarketOrderBook - Allow you to keep track of the state of Tokenize order books on a price aggregated basis with customizable precision. @params: - market [string] (required): The market, eg: "MYR-BTC"; - orderType [string] (optional): "buy" | "sell" | "both" | ""; - limit [int]: Limit numbers of order book to return. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_order_book
func (*MarketAPI) GetMarketSellOrders ¶
func (api *MarketAPI) GetMarketSellOrders(market string) ([]MarketOrder, error)
GetMarketSellOrders - Get all currently sell orders in Tokenize specified by market. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_market_sell_orders
func (*MarketAPI) GetMarketSummaries ¶
func (api *MarketAPI) GetMarketSummaries() ([]MarketSummary, error)
GetMarketSummaries - Used to get the last 24 hour summary of all active markets. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_market_summaries
func (*MarketAPI) GetMarketTicker ¶
func (api *MarketAPI) GetMarketTicker(market string) (*MarketTicker, error)
GetMarketTicker - Get ticker for specified market. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_ticker_market
func (*MarketAPI) GetMarketTicker24h ¶
func (api *MarketAPI) GetMarketTicker24h(market string) (*MarketTicker24h, error)
GetMarketTicker24h - Get statistics change price of a market. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_24h_change_price
func (*MarketAPI) GetMarkets ¶
func (api *MarketAPI) GetMarkets() ([]MarketInfo, error)
GetMarkets - Used to get the open and available trading markets at Tokenize along with other meta data. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#market_information
func (*MarketAPI) GetRawCandles ¶
func (api *MarketAPI) GetRawCandles(market string, resolution string, from, to int) ([]MarketCandleRaw, error)
GetRawCandles - Get raw candle data returned from API. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_candlestick
func (*MarketAPI) GetTradeHistory ¶
func (api *MarketAPI) GetTradeHistory(market string, limit int) ([]MarketHistoryRecord, error)
GetTradeHistory - Allows the retrieval of past public trades and includes details such as price, size, and time. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_trades_histories
type MarketAvgPrice ¶
type MarketCandle ¶
type MarketCandleRaw ¶
type MarketCandleRaw = [6]interface{}
type MarketDetail ¶
type MarketHistoryRecord ¶
type MarketInfo ¶
type MarketInfo struct { Title string List []MarketDetail }
type MarketOrder ¶
type MarketOrderData ¶
type MarketOrderData struct { Market string Orders []MarketOrder }
type MarketPrice ¶
type MarketSummary ¶
type MarketTicker ¶
type MarketTicker24h ¶
type OrderAPI ¶
type OrderAPI struct {
// contains filtered or unexported fields
}
OrderAPI - OrderAPI struct
func NewOrderAPI ¶
func NewOrderAPI(httpManager *HttpManager) *OrderAPI
NewOrderAPI - OrderAPI constructor
func (*OrderAPI) CancelOrder ¶
CancelOrder - Cancel one order Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#cancel_buy_order
func (*OrderAPI) GetBuyOrderDetail ¶
func (api *OrderAPI) GetBuyOrderDetail(id int) (*OrderDetail, error)
GetBuyOrderDetail - Check your buy order by specified id. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#check_buy_order
func (*OrderAPI) GetMyBuyOrders ¶
GetMyBuyOrders - Gets all buy orders of this account Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_all_your_buy_orders
func (*OrderAPI) GetMyOrders ¶
GetMyOrders - Get all orders of this account
func (*OrderAPI) GetMyPendingBuyOrders ¶
GetMyPendingBuyOrders - Gets all PENDING buy orders of this account Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#current_open_your_buy
func (*OrderAPI) GetMyPendingSellOrders ¶
GetMyPendingSellOrders - Gets all PENDING sell orders of this account Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#current_open_your_sell
func (*OrderAPI) GetMySellOrders ¶
GetMySellOrders - Gets all sell orders of this account Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#get_all_your_sell_orders
func (*OrderAPI) GetSellOrderDetail ¶
func (api *OrderAPI) GetSellOrderDetail(id int) (*OrderDetail, error)
GetSellOrderDetail - Check your sell order by specified id. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#check_sell_order
func (*OrderAPI) PlaceLimitBuyOrder ¶
func (api *OrderAPI) PlaceLimitBuyOrder(market string, units, price float64) (*PlacedOrder, error)
PlaceLimitBuyOrder - Place a new limit buy order @params: - market [string] (required): The market, eg: "MYR-BTC"; - units [float64] (required): The amount of this order; - price [float64] (required): The price of this order. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#place_buy_order
func (*OrderAPI) PlaceLimitSellOrder ¶
func (api *OrderAPI) PlaceLimitSellOrder(market string, units, price float64) (*PlacedOrder, error)
PlaceLimitSellOrder - Place a new limit sell order @params: - market [string] (required): The market, eg: "MYR-BTC"; - units [float64] (required): The amount of this order; - price [float64] (required): The price of this order. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#place_sell_order
func (*OrderAPI) PlaceMarketBuyOrder ¶
func (api *OrderAPI) PlaceMarketBuyOrder(market string, units float64) (*PlacedOrder, error)
PlaceMarketBuyOrder - Place a new limit buy order @params: - market [string] (required): The market, eg: "MYR-BTC"; - units [float64] (required): The amount of this order. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#place_buy_order
func (*OrderAPI) PlaceMarketSellOrder ¶
func (api *OrderAPI) PlaceMarketSellOrder(market string, units float64) (*PlacedOrder, error)
PlaceMarketSellOrder - Place a new limit sell order @params: - market [string] (required): The market, eg: "MYR-BTC"; - units [float64] (required): The amount of this order. Reference: https://tokenizexchange.zendesk.com/hc/en-gb/articles/360022521593-Developer-s-Guide-API#place_sell_order
type OrderBookData ¶
type OrderBookData struct { Buy []MarketOrder Sell []MarketOrder }