Documentation ¶
Index ¶
- type AccountClient
- func (p *AccountClient) FuturesTransfer(request account.FuturesTransferRequest) (int64, error)
- func (p *AccountClient) GetAccountAssetValuation(accountType string, valuationCurrency string, subUid int64) (*account.GetAccountAssetValuationResponse, error)
- func (p *AccountClient) GetAccountBalance(accountId string) (*account.AccountBalance, error)
- func (p *AccountClient) GetAccountHistory(accountId string, optionalRequest account.GetAccountHistoryOptionalRequest) ([]account.AccountHistory, error)
- func (p *AccountClient) GetAccountInfo() ([]account.AccountInfo, error)
- func (p *AccountClient) GetAccountLedger(accountId string, optionalRequest account.GetAccountLedgerOptionalRequest) ([]account.Ledger, error)
- func (p *AccountClient) GetPointBalance(subUid string) (*account.GetPointBalanceResponse, error)
- func (p *AccountClient) Init(accessKey string, secretKey string, host string) *AccountClient
- func (p *AccountClient) TransferAccount(request account.TransferAccountRequest) (*account.TransferAccountResponse, error)
- func (p *AccountClient) TransferPoint(request account.TransferPointRequest) (*account.TransferPointResponse, error)
- type AlgoOrderClient
- func (p *AlgoOrderClient) CancelOrder(request *algoorder.CancelOrdersRequest) (*algoorder.CancelOrdersResponse, error)
- func (p *AlgoOrderClient) GetHistoryOrders(request *model.GetRequest) (*algoorder.GetHistoryOrdersResponse, error)
- func (p *AlgoOrderClient) GetOpenOrders(request *model.GetRequest) (*algoorder.GetOpenOrdersResponse, error)
- func (p *AlgoOrderClient) GetSpecificOrder(request *model.GetRequest) (*algoorder.GetSpecificOrderResponse, error)
- func (p *AlgoOrderClient) Init(accessKey string, secretKey string, host string) *AlgoOrderClient
- func (p *AlgoOrderClient) PlaceOrder(request *algoorder.PlaceOrderRequest) (*algoorder.PlaceOrderResponse, error)
- type CommonClient
- func (p *CommonClient) GetCurrencys() ([]string, error)
- func (p *CommonClient) GetMarketStatus() (*common.MarketStatus, error)
- func (p *CommonClient) GetSymbols() ([]common.Symbol, error)
- func (p *CommonClient) GetSystemStatus() (string, error)
- func (p *CommonClient) GetTimestamp() (int, error)
- func (p *CommonClient) GetV2ReferenceCurrencies(optionalRequest common.GetV2ReferenceCurrencies) ([]common.CurrencyChain, error)
- func (p *CommonClient) Init(host string) *CommonClient
- type CrossMarginClient
- func (p *CrossMarginClient) ApplyLoan(request margin.CrossMarginOrdersRequest) (int, error)
- func (p *CrossMarginClient) GeneralMarginLoanOrders(optionalRequest margin.CrossMarginGeneralReplayLoanRecordsOptionalRequest) ([]margin.CrossMarginGeneraReplaylLoanRecord, error)
- func (p *CrossMarginClient) GeneralRepay(request margin.CrossMarginGeneralReplayLoanOptionalRequest) ([]margin.CrossMarginGeneraReplaylLoan, error)
- func (p *CrossMarginClient) GetMarginLoanInfo() ([]margin.CrossMarginLoanInfo, error)
- func (p *CrossMarginClient) Init(accessKey string, secretKey string, host string) *CrossMarginClient
- func (p *CrossMarginClient) MarginAccountsBalance(SubUid string) (*margin.CrossMarginAccountsBalance, error)
- func (p *CrossMarginClient) MarginLoanOrders(optionalRequest margin.CrossMarginLoanOrdersOptionalRequest) ([]margin.CrossMarginLoanOrder, error)
- func (p *CrossMarginClient) Repay(orderId string, request margin.MarginOrdersRepayRequest) (int, error)
- func (p *CrossMarginClient) TransferIn(request margin.CrossMarginTransferRequest) (int, error)
- func (p *CrossMarginClient) TransferOut(request margin.CrossMarginTransferRequest) (int, error)
- type ETFClient
- func (p *ETFClient) GetSwapConfig(etfName string) (*etf.SwapConfig, error)
- func (p *ETFClient) GetSwapList(etfName string, offset int, limit int) ([]*etf.SwapList, error)
- func (p *ETFClient) Init(accessKey string, secretKey string, host string) *ETFClient
- func (p *ETFClient) SwapIn(request etf.SwapRequest) (bool, error)
- func (p *ETFClient) SwapOut(request etf.SwapRequest) (bool, error)
- type IsolatedMarginClient
- func (p *IsolatedMarginClient) Apply(request margin.IsolatedMarginOrdersRequest) (int, error)
- func (p *IsolatedMarginClient) GetMarginLoanInfo(optionalRequest margin.GetMarginLoanInfoOptionalRequest) ([]margin.IsolatedMarginLoanInfo, error)
- func (p *IsolatedMarginClient) Init(accessKey string, secretKey string, host string) *IsolatedMarginClient
- func (p *IsolatedMarginClient) MarginAccountsBalance(optionalRequest margin.MarginAccountsBalanceOptionalRequest) ([]margin.IsolatedMarginAccountsBalance, error)
- func (p *IsolatedMarginClient) MarginLoanOrders(symbol string, optionalRequest margin.IsolatedMarginLoanOrdersOptionalRequest) ([]margin.IsolatedMarginLoanOrder, error)
- func (p *IsolatedMarginClient) Repay(orderId string, request margin.MarginOrdersRepayRequest) (int, error)
- func (p *IsolatedMarginClient) TransferIn(request margin.IsolatedMarginTransferRequest) (int, error)
- func (p *IsolatedMarginClient) TransferOut(request margin.IsolatedMarginTransferRequest) (int, error)
- type MarketClient
- func (client *MarketClient) GetAllSymbolsLast24hCandlesticksAskBid() ([]market.SymbolCandlestick, error)
- func (client *MarketClient) GetCandlestick(symbol string, optionalRequest market.GetCandlestickOptionalRequest) ([]market.Candlestick, error)
- func (client *MarketClient) GetDepth(symbol string, step string, optionalRequest market.GetDepthOptionalRequest) (*market.Depth, error)
- func (client *MarketClient) GetHistoricalTrade(symbol string, optionalRequest market.GetHistoricalTradeOptionalRequest) ([]market.TradeTick, error)
- func (client *MarketClient) GetLast24hCandlestick(symbol string) (*market.Candlestick, error)
- func (client *MarketClient) GetLast24hCandlestickAskBid(symbol string) (*market.CandlestickAskBid, error)
- func (client *MarketClient) GetLatestTrade(symbol string) (*market.TradeTick, error)
- func (p *MarketClient) Init(host string) *MarketClient
- type OrderClient
- func (p *OrderClient) CancelOrderByClientOrderId(clientOrderId string) (*order.CancelOrderByClientResponse, error)
- func (p *OrderClient) CancelOrderById(orderId string) (*order.CancelOrderByIdResponse, error)
- func (p *OrderClient) CancelOrdersByCriteria(request *order.CancelOrdersByCriteriaRequest) (*order.CancelOrdersByCriteriaResponse, error)
- func (p *OrderClient) CancelOrdersByIds(request *order.CancelOrdersByIdsRequest) (*order.CancelOrdersByIdsResponse, error)
- func (p *OrderClient) GetHistoryOrders(request *model.GetRequest) (*order.GetHistoryOrdersResponse, error)
- func (p *OrderClient) GetLast48hOrders(request *model.GetRequest) (*order.GetHistoryOrdersResponse, error)
- func (p *OrderClient) GetMatchResultsByCriteria(request *model.GetRequest) (*order.GetMatchResultsResponse, error)
- func (p *OrderClient) GetMatchResultsById(orderId string) (*order.GetMatchResultsResponse, error)
- func (p *OrderClient) GetOpenOrders(request *model.GetRequest) (*order.GetOpenOrdersResponse, error)
- func (p *OrderClient) GetOrderByCriteria(request *model.GetRequest) (*order.GetOrderResponse, error)
- func (p *OrderClient) GetOrderById(orderId string) (*order.GetOrderResponse, error)
- func (p *OrderClient) GetTransactFeeRate(request *model.GetRequest) (*order.GetTransactFeeRateResponse, error)
- func (p *OrderClient) Init(accessKey string, secretKey string, host string) *OrderClient
- func (p *OrderClient) PlaceOrder(request *order.PlaceOrderRequest) (*order.PlaceOrderResponse, error)
- func (p *OrderClient) PlaceOrders(request []order.PlaceOrderRequest) (*order.PlaceOrdersResponse, error)
- type StableCoinClient
- func (p *StableCoinClient) ExchangeStableCoin(quoteId string) (*stablecoin.ExchangeStableCoinResponse, error)
- func (p *StableCoinClient) GetExchangeRate(currency string, amount string, exchangeType string) (*stablecoin.GetExchangeRateResponse, error)
- func (p *StableCoinClient) Init(accessKey string, secretKey string, host string) *StableCoinClient
- type SubUserClient
- func (p *SubUserClient) CreateSubUser(request subuser.CreateSubUserRequest) ([]subuser.UserData, error)
- func (p *SubUserClient) GetSubUserAccount(subUid int64) ([]account.SubUserAccount, error)
- func (p *SubUserClient) GetSubUserAggregateBalance() ([]account.AccountBalance, error)
- func (p *SubUserClient) GetSubUserDepositAddress(subUid int64, currency string) ([]wallet.DepositAddress, error)
- func (p *SubUserClient) GetUid() (int64, error)
- func (p *SubUserClient) Init(accessKey string, secretKey string, host string) *SubUserClient
- func (p *SubUserClient) QuerySubUserDepositHistory(subUid int64, ...) ([]subuser.DepositHistory, error)
- func (p *SubUserClient) SetSubUserTradableMarket(request subuser.SetSubUserTradableMarketRequest) ([]subuser.TradableMarket, error)
- func (p *SubUserClient) SetSubUserTransferability(request subuser.SetSubUserTransferabilityRequest) ([]subuser.Transferability, error)
- func (p *SubUserClient) SubUserManagement(request subuser.SubUserManagementRequest) (*subuser.SubUserManagement, error)
- func (p *SubUserClient) SubUserTransfer(request subuser.SubUserTransferRequest) (string, error)
- type WalletClient
- func (p *WalletClient) CancelWithdraw(withdrawId int64) (int64, error)
- func (p *WalletClient) CreateWithdraw(request wallet.CreateWithdrawRequest) (int64, error)
- func (p *WalletClient) GetDepositAddress(currency string) ([]wallet.DepositAddress, error)
- func (p *WalletClient) GetWithdrawAddress(request *model.GetRequest) (*wallet.GetWithdrawAddressResponse, error)
- func (p *WalletClient) GetWithdrawQuota(currency string) (*wallet.WithdrawQuota, error)
- func (p *WalletClient) Init(accessKey string, secretKey string, host string) *WalletClient
- func (p *WalletClient) QueryDepositWithdraw(depositOrWithdraw string, ...) ([]wallet.DepositWithdraw, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountClient ¶
type AccountClient struct {
// contains filtered or unexported fields
}
Responsible to operate account
func (*AccountClient) FuturesTransfer ¶
func (p *AccountClient) FuturesTransfer(request account.FuturesTransferRequest) (int64, error)
Transfer fund between spot account and future contract account
func (*AccountClient) GetAccountAssetValuation ¶
func (p *AccountClient) GetAccountAssetValuation(accountType string, valuationCurrency string, subUid int64) (*account.GetAccountAssetValuationResponse, error)
Returns the valuation of the total assets of the account in btc or fiat currency.
func (*AccountClient) GetAccountBalance ¶
func (p *AccountClient) GetAccountBalance(accountId string) (*account.AccountBalance, error)
Returns the balance of an account specified by account id
func (*AccountClient) GetAccountHistory ¶
func (p *AccountClient) GetAccountHistory(accountId string, optionalRequest account.GetAccountHistoryOptionalRequest) ([]account.AccountHistory, error)
Returns the amount changes of specified user's account
func (*AccountClient) GetAccountInfo ¶
func (p *AccountClient) GetAccountInfo() ([]account.AccountInfo, error)
Returns a list of accounts owned by this API user
func (*AccountClient) GetAccountLedger ¶
func (p *AccountClient) GetAccountLedger(accountId string, optionalRequest account.GetAccountLedgerOptionalRequest) ([]account.Ledger, error)
Returns the account ledger of specified user's account
func (*AccountClient) GetPointBalance ¶
func (p *AccountClient) GetPointBalance(subUid string) (*account.GetPointBalanceResponse, error)
Returns the point balance of specified user's account
func (*AccountClient) Init ¶
func (p *AccountClient) Init(accessKey string, secretKey string, host string) *AccountClient
Initializer
func (*AccountClient) TransferAccount ¶
func (p *AccountClient) TransferAccount(request account.TransferAccountRequest) (*account.TransferAccountResponse, error)
func (*AccountClient) TransferPoint ¶
func (p *AccountClient) TransferPoint(request account.TransferPointRequest) (*account.TransferPointResponse, error)
Transfer points between spot account and future contract account
type AlgoOrderClient ¶
type AlgoOrderClient struct {
// contains filtered or unexported fields
}
Responsible to operate algo order
func (*AlgoOrderClient) CancelOrder ¶
func (p *AlgoOrderClient) CancelOrder(request *algoorder.CancelOrdersRequest) (*algoorder.CancelOrdersResponse, error)
Cancel orders by client order id
func (*AlgoOrderClient) GetHistoryOrders ¶
func (p *AlgoOrderClient) GetHistoryOrders(request *model.GetRequest) (*algoorder.GetHistoryOrdersResponse, error)
func (*AlgoOrderClient) GetOpenOrders ¶
func (p *AlgoOrderClient) GetOpenOrders(request *model.GetRequest) (*algoorder.GetOpenOrdersResponse, error)
func (*AlgoOrderClient) GetSpecificOrder ¶
func (p *AlgoOrderClient) GetSpecificOrder(request *model.GetRequest) (*algoorder.GetSpecificOrderResponse, error)
func (*AlgoOrderClient) Init ¶
func (p *AlgoOrderClient) Init(accessKey string, secretKey string, host string) *AlgoOrderClient
Initializer
func (*AlgoOrderClient) PlaceOrder ¶
func (p *AlgoOrderClient) PlaceOrder(request *algoorder.PlaceOrderRequest) (*algoorder.PlaceOrderResponse, error)
Place a new order
type CommonClient ¶
type CommonClient struct {
// contains filtered or unexported fields
}
Responsible to get common information
func (*CommonClient) GetCurrencys ¶
func (p *CommonClient) GetCurrencys() ([]string, error)
Get all Supported Currencies This endpoint returns all Huobi's supported trading currencies.
func (*CommonClient) GetMarketStatus ¶
func (p *CommonClient) GetMarketStatus() (*common.MarketStatus, error)
Returns current market status
func (*CommonClient) GetSymbols ¶
func (p *CommonClient) GetSymbols() ([]common.Symbol, error)
Get all Supported Trading Symbol This endpoint returns all Huobi's supported trading symbol.
func (*CommonClient) GetSystemStatus ¶
func (p *CommonClient) GetSystemStatus() (string, error)
func (*CommonClient) GetTimestamp ¶
func (p *CommonClient) GetTimestamp() (int, error)
Get Current Timestamp This endpoint returns the current timestamp, i.e. the number of milliseconds that have elapsed since 00:00:00 UTC on 1 January 1970.
func (*CommonClient) GetV2ReferenceCurrencies ¶
func (p *CommonClient) GetV2ReferenceCurrencies(optionalRequest common.GetV2ReferenceCurrencies) ([]common.CurrencyChain, error)
APIv2 - Currency & Chains API user could query static reference information for each currency, as well as its corresponding chain(s). (Public Endpoint)
type CrossMarginClient ¶
type CrossMarginClient struct {
// contains filtered or unexported fields
}
Responsible to operate cross margin
func (*CrossMarginClient) ApplyLoan ¶
func (p *CrossMarginClient) ApplyLoan(request margin.CrossMarginOrdersRequest) (int, error)
Place an order to apply a margin loan.
func (*CrossMarginClient) GeneralMarginLoanOrders ¶
func (p *CrossMarginClient) GeneralMarginLoanOrders(optionalRequest margin.CrossMarginGeneralReplayLoanRecordsOptionalRequest) ([]margin.CrossMarginGeneraReplaylLoanRecord, error)
Returns general margin orders based on a specific searching criteria.
func (*CrossMarginClient) GeneralRepay ¶
func (p *CrossMarginClient) GeneralRepay(request margin.CrossMarginGeneralReplayLoanOptionalRequest) ([]margin.CrossMarginGeneraReplaylLoan, error)
Repays general margin loan with you asset in your margin account.
func (*CrossMarginClient) GetMarginLoanInfo ¶
func (p *CrossMarginClient) GetMarginLoanInfo() ([]margin.CrossMarginLoanInfo, error)
Returns loan interest rates and quota applied on the user
func (*CrossMarginClient) Init ¶
func (p *CrossMarginClient) Init(accessKey string, secretKey string, host string) *CrossMarginClient
Initializer
func (*CrossMarginClient) MarginAccountsBalance ¶
func (p *CrossMarginClient) MarginAccountsBalance(SubUid string) (*margin.CrossMarginAccountsBalance, error)
Returns the balance of the margin loan account.
func (*CrossMarginClient) MarginLoanOrders ¶
func (p *CrossMarginClient) MarginLoanOrders(optionalRequest margin.CrossMarginLoanOrdersOptionalRequest) ([]margin.CrossMarginLoanOrder, error)
Returns margin orders based on a specific searching criteria.
func (*CrossMarginClient) Repay ¶
func (p *CrossMarginClient) Repay(orderId string, request margin.MarginOrdersRepayRequest) (int, error)
Repays margin loan with you asset in your margin account.
func (*CrossMarginClient) TransferIn ¶
func (p *CrossMarginClient) TransferIn(request margin.CrossMarginTransferRequest) (int, error)
Transfer specific asset from spot trading account to cross margin account
func (*CrossMarginClient) TransferOut ¶
func (p *CrossMarginClient) TransferOut(request margin.CrossMarginTransferRequest) (int, error)
Transfer specific asset from cross margin account to spot trading account
type ETFClient ¶
type ETFClient struct {
// contains filtered or unexported fields
}
Responsible to operate ETF
func (*ETFClient) GetSwapConfig ¶
func (p *ETFClient) GetSwapConfig(etfName string) (*etf.SwapConfig, error)
Return the basic information of ETF creation and redemption, as well as ETF constituents
func (*ETFClient) GetSwapList ¶
Get past creation and redemption.(up to 100 records)
type IsolatedMarginClient ¶
type IsolatedMarginClient struct {
// contains filtered or unexported fields
}
Responsible to operate isolated margin
func (*IsolatedMarginClient) Apply ¶
func (p *IsolatedMarginClient) Apply(request margin.IsolatedMarginOrdersRequest) (int, error)
Place an order to apply a margin loan.
func (*IsolatedMarginClient) GetMarginLoanInfo ¶
func (p *IsolatedMarginClient) GetMarginLoanInfo(optionalRequest margin.GetMarginLoanInfoOptionalRequest) ([]margin.IsolatedMarginLoanInfo, error)
Returns loan interest rates and quota applied on the user
func (*IsolatedMarginClient) Init ¶
func (p *IsolatedMarginClient) Init(accessKey string, secretKey string, host string) *IsolatedMarginClient
Initializer
func (*IsolatedMarginClient) MarginAccountsBalance ¶
func (p *IsolatedMarginClient) MarginAccountsBalance(optionalRequest margin.MarginAccountsBalanceOptionalRequest) ([]margin.IsolatedMarginAccountsBalance, error)
Returns the balance of the margin loan account.
func (*IsolatedMarginClient) MarginLoanOrders ¶
func (p *IsolatedMarginClient) MarginLoanOrders(symbol string, optionalRequest margin.IsolatedMarginLoanOrdersOptionalRequest) ([]margin.IsolatedMarginLoanOrder, error)
Returns margin orders based on a specific searching criteria.
func (*IsolatedMarginClient) Repay ¶
func (p *IsolatedMarginClient) Repay(orderId string, request margin.MarginOrdersRepayRequest) (int, error)
Repays margin loan with you asset in your margin account.
func (*IsolatedMarginClient) TransferIn ¶
func (p *IsolatedMarginClient) TransferIn(request margin.IsolatedMarginTransferRequest) (int, error)
Transfer specific asset from spot trading account to isolated margin account
func (*IsolatedMarginClient) TransferOut ¶
func (p *IsolatedMarginClient) TransferOut(request margin.IsolatedMarginTransferRequest) (int, error)
Transfer specific asset from isolated margin account to spot trading account
type MarketClient ¶
type MarketClient struct {
// contains filtered or unexported fields
}
Responsible to get market information
func (*MarketClient) GetAllSymbolsLast24hCandlesticksAskBid ¶
func (client *MarketClient) GetAllSymbolsLast24hCandlesticksAskBid() ([]market.SymbolCandlestick, error)
Retrieve the latest tickers for all supported pairs.
func (*MarketClient) GetCandlestick ¶
func (client *MarketClient) GetCandlestick(symbol string, optionalRequest market.GetCandlestickOptionalRequest) ([]market.Candlestick, error)
Retrieves all klines in a specific range.
func (*MarketClient) GetDepth ¶
func (client *MarketClient) GetDepth(symbol string, step string, optionalRequest market.GetDepthOptionalRequest) (*market.Depth, error)
Retrieves the current order book of a specific pair
func (*MarketClient) GetHistoricalTrade ¶
func (client *MarketClient) GetHistoricalTrade(symbol string, optionalRequest market.GetHistoricalTradeOptionalRequest) ([]market.TradeTick, error)
Retrieves the most recent trades with their price, volume, and direction.
func (*MarketClient) GetLast24hCandlestick ¶
func (client *MarketClient) GetLast24hCandlestick(symbol string) (*market.Candlestick, error)
Retrieves the summary of trading in the market for the last 24 hours.
func (*MarketClient) GetLast24hCandlestickAskBid ¶
func (client *MarketClient) GetLast24hCandlestickAskBid(symbol string) (*market.CandlestickAskBid, error)
Retrieves the latest ticker with some important 24h aggregated market data.
func (*MarketClient) GetLatestTrade ¶
func (client *MarketClient) GetLatestTrade(symbol string) (*market.TradeTick, error)
Retrieves the latest trade with its price, volume, and direction.
type OrderClient ¶
type OrderClient struct {
// contains filtered or unexported fields
}
Responsible to operate on order
func (*OrderClient) CancelOrderByClientOrderId ¶
func (p *OrderClient) CancelOrderByClientOrderId(clientOrderId string) (*order.CancelOrderByClientResponse, error)
Cancel an order by client order id
func (*OrderClient) CancelOrderById ¶
func (p *OrderClient) CancelOrderById(orderId string) (*order.CancelOrderByIdResponse, error)
Cancel an order by order id
func (*OrderClient) CancelOrdersByCriteria ¶
func (p *OrderClient) CancelOrdersByCriteria(request *order.CancelOrdersByCriteriaRequest) (*order.CancelOrdersByCriteriaResponse, error)
Submit cancellation for multiple orders at once with given criteria.
func (*OrderClient) CancelOrdersByIds ¶
func (p *OrderClient) CancelOrdersByIds(request *order.CancelOrdersByIdsRequest) (*order.CancelOrdersByIdsResponse, error)
Submit cancellation for multiple orders at once with given ids
func (*OrderClient) GetHistoryOrders ¶
func (p *OrderClient) GetHistoryOrders(request *model.GetRequest) (*order.GetHistoryOrdersResponse, error)
Returns orders based on a specific searching criteria.
func (*OrderClient) GetLast48hOrders ¶
func (p *OrderClient) GetLast48hOrders(request *model.GetRequest) (*order.GetHistoryOrdersResponse, error)
Returns orders based on a specific searching criteria (within 48 hours)
func (*OrderClient) GetMatchResultsByCriteria ¶
func (p *OrderClient) GetMatchResultsByCriteria(request *model.GetRequest) (*order.GetMatchResultsResponse, error)
Returns the match results of past and open orders based on specific search criteria.
func (*OrderClient) GetMatchResultsById ¶
func (p *OrderClient) GetMatchResultsById(orderId string) (*order.GetMatchResultsResponse, error)
Returns the match result of an order.
func (*OrderClient) GetOpenOrders ¶
func (p *OrderClient) GetOpenOrders(request *model.GetRequest) (*order.GetOpenOrdersResponse, error)
Returns all open orders which have not been filled completely.
func (*OrderClient) GetOrderByCriteria ¶
func (p *OrderClient) GetOrderByCriteria(request *model.GetRequest) (*order.GetOrderResponse, error)
Returns the detail of one order by client order id
func (*OrderClient) GetOrderById ¶
func (p *OrderClient) GetOrderById(orderId string) (*order.GetOrderResponse, error)
Returns the detail of one order by order id
func (*OrderClient) GetTransactFeeRate ¶
func (p *OrderClient) GetTransactFeeRate(request *model.GetRequest) (*order.GetTransactFeeRateResponse, error)
Returns the current transaction fee rate applied to the user.
func (*OrderClient) Init ¶
func (p *OrderClient) Init(accessKey string, secretKey string, host string) *OrderClient
Initializer
func (*OrderClient) PlaceOrder ¶
func (p *OrderClient) PlaceOrder(request *order.PlaceOrderRequest) (*order.PlaceOrderResponse, error)
Place a new order and send to the exchange to be matched.
func (*OrderClient) PlaceOrders ¶
func (p *OrderClient) PlaceOrders(request []order.PlaceOrderRequest) (*order.PlaceOrdersResponse, error)
Place multipler orders (at most 10 orders)
type StableCoinClient ¶
type StableCoinClient struct {
// contains filtered or unexported fields
}
Responsible to operate wallet
func (*StableCoinClient) ExchangeStableCoin ¶
func (p *StableCoinClient) ExchangeStableCoin(quoteId string) (*stablecoin.ExchangeStableCoinResponse, error)
Exchange stable coin
func (*StableCoinClient) GetExchangeRate ¶
func (p *StableCoinClient) GetExchangeRate(currency string, amount string, exchangeType string) (*stablecoin.GetExchangeRateResponse, error)
Get stable coin exchange rate
func (*StableCoinClient) Init ¶
func (p *StableCoinClient) Init(accessKey string, secretKey string, host string) *StableCoinClient
Initializer
type SubUserClient ¶
type SubUserClient struct {
// contains filtered or unexported fields
}
Responsible to operate wallet
func (*SubUserClient) CreateSubUser ¶
func (p *SubUserClient) CreateSubUser(request subuser.CreateSubUserRequest) ([]subuser.UserData, error)
Parent user query sub user deposit address of corresponding chain, for a specific crypto currency (except IOTA)
func (*SubUserClient) GetSubUserAccount ¶
func (p *SubUserClient) GetSubUserAccount(subUid int64) ([]account.SubUserAccount, error)
Returns the balance of a sub-account specified by sub-uid
func (*SubUserClient) GetSubUserAggregateBalance ¶
func (p *SubUserClient) GetSubUserAggregateBalance() ([]account.AccountBalance, error)
Returns the aggregated balance from all the sub-users
func (*SubUserClient) GetSubUserDepositAddress ¶
func (p *SubUserClient) GetSubUserDepositAddress(subUid int64, currency string) ([]wallet.DepositAddress, error)
Parent user query sub user deposit address of corresponding chain, for a specific crypto currency (except IOTA)
func (*SubUserClient) GetUid ¶
func (p *SubUserClient) GetUid() (int64, error)
func (*SubUserClient) Init ¶
func (p *SubUserClient) Init(accessKey string, secretKey string, host string) *SubUserClient
Initializer
func (*SubUserClient) QuerySubUserDepositHistory ¶
func (p *SubUserClient) QuerySubUserDepositHistory(subUid int64, optionalRequest subuser.QuerySubUserDepositHistoryOptionalRequest) ([]subuser.DepositHistory, error)
Parent user query sub user deposits history
func (*SubUserClient) SetSubUserTradableMarket ¶
func (p *SubUserClient) SetSubUserTradableMarket(request subuser.SetSubUserTradableMarketRequest) ([]subuser.TradableMarket, error)
Set Tradable Market for Sub Users
func (*SubUserClient) SetSubUserTransferability ¶
func (p *SubUserClient) SetSubUserTransferability(request subuser.SetSubUserTransferabilityRequest) ([]subuser.Transferability, error)
Set Asset Transfer Permission for Sub Users
func (*SubUserClient) SubUserManagement ¶
func (p *SubUserClient) SubUserManagement(request subuser.SubUserManagementRequest) (*subuser.SubUserManagement, error)
Lock or unlock a specific user
func (*SubUserClient) SubUserTransfer ¶
func (p *SubUserClient) SubUserTransfer(request subuser.SubUserTransferRequest) (string, error)
Transfer asset between parent and sub account
type WalletClient ¶
type WalletClient struct {
// contains filtered or unexported fields
}
Responsible to operate wallet
func (*WalletClient) CancelWithdraw ¶
func (p *WalletClient) CancelWithdraw(withdrawId int64) (int64, error)
Cancels a previously created withdraw request by its transfer id.
func (*WalletClient) CreateWithdraw ¶
func (p *WalletClient) CreateWithdraw(request wallet.CreateWithdrawRequest) (int64, error)
Withdraw from spot trading account to an external address.
func (*WalletClient) GetDepositAddress ¶
func (p *WalletClient) GetDepositAddress(currency string) ([]wallet.DepositAddress, error)
Get deposit address of corresponding chain, for a specific crypto currency (except IOTA)
func (*WalletClient) GetWithdrawAddress ¶
func (p *WalletClient) GetWithdrawAddress(request *model.GetRequest) (*wallet.GetWithdrawAddressResponse, error)
Parent user to query withdraw address available for API key
func (*WalletClient) GetWithdrawQuota ¶
func (p *WalletClient) GetWithdrawQuota(currency string) (*wallet.WithdrawQuota, error)
Query withdraw quota for currencies
func (*WalletClient) Init ¶
func (p *WalletClient) Init(accessKey string, secretKey string, host string) *WalletClient
Initializer
func (*WalletClient) QueryDepositWithdraw ¶
func (p *WalletClient) QueryDepositWithdraw(depositOrWithdraw string, optionalRequest wallet.QueryDepositWithdrawOptionalRequest) ([]wallet.DepositWithdraw, error)
Returns all existed withdraws and deposits and return their latest status.