Versions in this module Expand all Collapse all v1 v1.0.3 Nov 9, 2022 Changes in this version + type AccountBalanceV2 struct + CryptoAccounts []struct{ ... } + FiatAccounts []struct{ ... } type Client + func (c *Client) GetAllAccountBalancesV2() (AccountBalanceV2, error) v1.0.2 Nov 9, 2022 Changes in this version + const APILIMIT + const BASEURL + const BTCJPY + const BTCUSD + const BUY + const ETHJPY + const ETHUSD + const FUNDJPY + const FUNDUSD + const LIMIT + const MARKET + const NETOUT + const ONEDIRECTION + const PRODUCT5_BTCJPY + const PUSHERAPPNAME + const PUSHERCREATED + const PUSHERKEY + const PUSHERTAPHOST + const PUSHERUPDATE + const PUSHERchASK + const PUSHERchBID + const PUSHERchDETAILEXECUTION + const PUSHERchEXECUTION + const PUSHERchUSEREXECUTION + const QASHJPY + const SELL + const TWODIRECTION + const VERSION + const XRPJPY + const XRPUSD + func ToPriceString(price float64) string + func ToQtyString(size float64) string + type Account struct + Balance float64 + Currency string + CurrencySymbol string + CurrencyType string + ExchangeRate big.Float + HighestOfferInterestRate float64 + ID int + LowestOfferInterestRate float64 + PusherChannel string + type AccountBalance struct + Balance string + Currency string + type Books [][]json.Number + type Client struct + HTTPClient *http.Client + Logger *log.Logger + Secret string + TokenNumber string + URL *url.URL + func New(tokenNum string, secret string, logger *log.Logger) (*Client, error) + func (c *Client) CancelOrder(orderID int) (Order, error) + func (c *Client) CloseAllTrade(side string) ([]Trade, error) + func (c *Client) CloseLoanBid(loanBidID int) (LoanBid, error) + func (c *Client) CloseTrade(tradeID int, closedQuantity float64) (Trade, error) + func (c *Client) CreateFiatAccount(currency string) (Account, error) + func (c *Client) CreateLoanBid(quantity, currency, rate string) (LoanBid, error) + func (c *Client) CreateOrder(o *RequestOrder) (Order, error) + func (c *Client) EditLiveOrder(id int, e *EditOrderParams) (Order, error) + func (c *Client) GetATradingAccount(tradingAccountID int) (TradingAccount, error) + func (c *Client) GetAllAccountBalances() ([]AccountBalance, error) + func (c *Client) GetCryptoAccounts() ([]CryptoAccount, error) + func (c *Client) GetExecutions(productID int, limit int, page int) (Executions, error) + func (c *Client) GetExecutionsByTimestamp(productID int, limit int, timestamp int) ([]ExecutionsModels, error) + func (c *Client) GetFiatAccounts() ([]Account, error) + func (c *Client) GetInterestRates(currency string) (InterestRates, error) + func (c *Client) GetLoanBids(currency string) (LoanBids, error) + func (c *Client) GetLoans(currency string) (Loans, error) + func (c *Client) GetOrder(orderID int) (Order, error) + func (c *Client) GetOrderBook(productID int, full bool) (Depth, error) + func (c *Client) GetOrderByClientID(clientID string) (Order, error) + func (c *Client) GetOrderTrades(orderID int) ([]Trade, error) + func (c *Client) GetOrders(filters OrdersFilter) (Order, error) + func (c *Client) GetOwnExecutions(productID int) (Executions, error) + func (c *Client) GetProduct(productID int) (Product, error) + func (c *Client) GetProducts() ([]Product, error) + func (c *Client) GetTrades(fundingCurrency, status string) (Trades, error) + func (c *Client) GetTradesLoans(tradeID int) ([]Loan, error) + func (c *Client) GetTradingAccounts() ([]TradingAccount, error) + func (c *Client) UpdateALoan(loanID int, fundReloaned bool) (Loan, error) + func (c *Client) UpdateLeverageLevel(tradeAccountID, leverageLevel int) (TradingAccount, error) + func (c *Client) UpdateTrade(tradeID, stopLoss, takeProfit int) (Trade, error) + func (p *Client) OrderAllClose() + type CryptoAccount struct + Address string + Balance string + Currency string + CurrencySymbol string + CurrencyType string + HighestOfferInterestRate string + ID int + LowestOfferInterestRate string + MinimumWithdraw float64 + PusherChannel string + type Depth struct + BuyPriceLevels Books + SellPriceLevels Books + func (p *Depth) GetBuyDepthFloat64() [][]float64 + func (p *Depth) GetSellDepthFloat64() [][]float64 + func (p *Depth) SortBuyDepthByPrice(order string) [][]float64 + func (p *Depth) SortBuyDepthByQuontity() [][]float64 + func (p *Depth) SortSellDepthByPrice(order string) [][]float64 + func (p *Depth) SortSellDepthByQuontity() [][]float64 + type EditOrderParams struct + Price string + Quantity string + type Executions struct + CurrentPage int + Models []ExecutionsModels + TotalPages int + type ExecutionsModels struct + CreatedAt int64 + ID int + MySide string + Price float64 + Quantity float64 + TakerSide string + type InterestRates struct + Asks [][]string + Bids [][]string + type Limit struct + func NewLimit(isPrivate bool) *Limit + func (p *Limit) Check() error + func (p *Limit) Remain() int + func (p *Limit) ResetAPI() + type Loan struct + BorrowerID int + CreatedAt int64 + Currency string + FundReloaned bool + ID int + LenderID int + Quantity string + Rate string + Status string + type LoanBid struct + BidaskType string + Currency string + FilledQuantity float64 + ID int + Quantity float64 + Rate float64 + Side string + Status string + UserID int + type LoanBids struct + CurrentPage int + Models []LoanBid + TotalPages int + type Loans struct + CurrentPage int + Models []*Loan + TotalPages int + type Order struct + AveragePrice decimal.Decimal + ClientOrderID string + CreatedAt int + CryptoAccountID interface{} + CurrencyPairCode string + DiscQuantity decimal.Decimal + FilledQuantity decimal.Decimal + FundingCurrency string + ID int64 + IcebergTotalQuantity decimal.Decimal + LeverageLevel int + MarginInterest decimal.Decimal + MarginType interface{} + MarginUsed decimal.Decimal + OrderFee decimal.Decimal + OrderType string + Price decimal.Decimal + ProductCode string + ProductID int + Quantity decimal.Decimal + Settings interface{} + Side string + SourceAction string + SourceExchange interface{} + Status string + StopLoss interface{} + StopTriggeredTime interface{} + TakeProfit interface{} + Target string + TradeID interface{} + TradingType string + TrailingStopType interface{} + TrailingStopValue interface{} + UnwoundTradeID interface{} + UnwoundTradeLeverageLevel interface{} + UpdatedAt int + type OrderExecutions []struct + type OrderParams struct + ClientOrderID string + FundingCurrency string + LeverageLevel int + MarginType string + OrderDirection string + OrderType string + Price string + PriceRange string + ProductID int + Quantity string + Side string + TradingType string + type Orders struct + CurrentPage int + Models []Order + TotalPages int + type OrdersFilter struct + CurrencyPairCode string + FundingCurrency string + Limit string + Page string + ProductID string + Status string + TradingType string + WithDetails string + type Product struct + BaseCurrency string + Code string + Currency string + CurrencyPairCode string + ExchangeRate float64 + FiatMinimumWithdraw float64 + HighMarketAsk float64 + ID string + Indicator int + LastPrice24H float64 + LastTradedPrice float64 + LastTradedQuantity float64 + LowMarketBid float64 + MakerFee float64 + MarketAsk float64 + MarketBid float64 + Name string + ProductType string + PusherChannel string + QuotedCurrency string + Symbol string + TakerFee float64 + Volume24H float64 + type PusherBooks struct + Books Books + IsAsk bool + type PusherExecution struct + CreatedAt int64 + Delay time.Duration + ID int + Price float64 + Quantity float64 + TakerSide string + type PusherExecutionMe struct + ClientOrderID string + CreatedAt int64 + Delay time.Duration + ID int + MySide string + OrderID int + Price float64 + Quantity float64 + TakerSide string + type Realtime struct + Results chan interface{} + func NewConnect() *Realtime + func (p *Realtime) Connect(channels, products []string) + type RequestOrder struct + Order OrderParams + type Trade struct + CloseFee float64 + ClosePnl float64 + ClosePrice float64 + CloseQuantity float64 + CreatedAt int64 + CurrencyPairCode string + DailyInterest float64 + FundingCurrency string + ID int + LeverageLevel int + MarginUsed float64 + OpenPnl float64 + OpenPrice float64 + OpenQuantity float64 + Pnl float64 + ProductCode string + ProductID int + Quantity float64 + Side string + Status string + StopLoss float64 + TakeProfit float64 + TotalInterest float64 + TraderID int + UpdatedAt int64 + type Trades struct + CurrentPage int + Models []Trade + TotalPages int + type TradingAccount struct + Balance json.Number + CreatedAt int64 + CurrencyPairCode string + Equity json.Number + FreeMargin json.Number + FundingCurrency string + ID int + LeverageLevel int + Margin json.Number + MarginPercent json.Number + MaxLeverageLevel int + Pnl json.Number + Position json.Number + ProductCode string + ProductID int + PusherChannel string + Status string + TraderID int + UpdatedAt int64