quoinex

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	URL        *url.URL
	ApiTokenID string
	ApiSecret  string
	HTTPClient *http.Client
	Logger     *log.Logger
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiTokenID string, apiSecret string, logger *log.Logger) (*Client, error)

func (*Client) CancelAnOrder

func (c *Client) CancelAnOrder(ctx context.Context, orderID uint64) (*models.Order, error)

func (*Client) CloseAllTrade

func (c *Client) CloseAllTrade(ctx context.Context, side string) ([]*models.Trade, error)

func (*Client) CloseLoanBid

func (c *Client) CloseLoanBid(ctx context.Context, loanBidID int) (*models.LoanBid, error)

func (*Client) CloseTrade

func (c *Client) CloseTrade(ctx context.Context, tradeID int, closedQuantity float64) (*models.Trade, error)

func (*Client) CreateAFiatAccount

func (c *Client) CreateAFiatAccount(ctx context.Context, currency string) (*models.Account, error)

func (*Client) CreateALoanBid

func (c *Client) CreateALoanBid(ctx context.Context, quantity, currency, rate string) (*models.LoanBid, error)

func (*Client) CreateAnOrder

func (c *Client) CreateAnOrder(ctx context.Context, orderType, side, quantity, price, priceRange string, productID int) (*models.Order, error)

func (*Client) EditALiveOrder

func (c *Client) EditALiveOrder(ctx context.Context, orderID uint64, quantity, price string) (*models.Order, error)

func (*Client) GetATradingAccount

func (c *Client) GetATradingAccount(ctx context.Context, tradingAccountID int) (*models.TradingAccount, error)

func (*Client) GetAllAccountBalances

func (c *Client) GetAllAccountBalances(ctx context.Context) ([]*models.AccountBalance, error)

func (*Client) GetAnOrder

func (c *Client) GetAnOrder(ctx context.Context, orderID uint64) (*models.Order, error)

func (*Client) GetAnOrderTrades

func (c *Client) GetAnOrderTrades(ctx context.Context, orderID uint64) ([]*models.Trade, error)

func (*Client) GetCryptoAccounts

func (c *Client) GetCryptoAccounts(ctx context.Context) ([]*models.CryptoAccount, error)

func (*Client) GetExecutions

func (c *Client) GetExecutions(ctx context.Context, productID int, limit int, page int) (*models.Executions, error)

func (*Client) GetExecutionsByTimestamp

func (c *Client) GetExecutionsByTimestamp(ctx context.Context, productID int, limit int, timestamp int) ([]*models.ExecutionsModels, error)

func (*Client) GetFiatAccounts

func (c *Client) GetFiatAccounts(ctx context.Context) ([]*models.Account, error)

func (*Client) GetInterestRates

func (c *Client) GetInterestRates(ctx context.Context, currency string) (*models.InterestRates, error)

func (*Client) GetLoanBids

func (c *Client) GetLoanBids(ctx context.Context, currency string) (*models.LoanBids, error)

func (*Client) GetLoans

func (c *Client) GetLoans(ctx context.Context, currency string) (*models.Loans, error)

func (*Client) GetOrderBook

func (c *Client) GetOrderBook(ctx context.Context, productID int, full bool) (*models.PriceLevels, error)

func (*Client) GetOrders

func (c *Client) GetOrders(ctx context.Context, productID, withDetails int, fundingCurrency, status string) (*models.Orders, error)

func (*Client) GetOwnExecutions

func (c *Client) GetOwnExecutions(ctx context.Context, productID int) (*models.Executions, error)

func (*Client) GetProduct

func (c *Client) GetProduct(ctx context.Context, productID int) (*models.Product, error)

func (*Client) GetProducts

func (c *Client) GetProducts(ctx context.Context) ([]*models.Product, error)

func (*Client) GetTrades

func (c *Client) GetTrades(ctx context.Context, fundingCurrency, status string) (*models.Trades, error)

func (*Client) GetTradesLoans

func (c *Client) GetTradesLoans(ctx context.Context, tradeID int) ([]*models.Loan, error)

func (*Client) GetTradingAccounts

func (c *Client) GetTradingAccounts(ctx context.Context) ([]*models.TradingAccount, error)

func (*Client) UpdateALoan

func (c *Client) UpdateALoan(ctx context.Context, loanID int, fundReloaned bool) (*models.Loan, error)

func (*Client) UpdateLeverageLevel

func (c *Client) UpdateLeverageLevel(ctx context.Context, tradeAccountID, leverageLevel int) (*models.TradingAccount, error)

func (*Client) UpdateTrade

func (c *Client) UpdateTrade(ctx context.Context, tradeID, stopLoss, takeProfit int) (*models.Trade, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL