kucoin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sym2duo

func Sym2duo(pair string) q.D

Types

type KuCoin

type KuCoin struct {
	// contains filtered or unexported fields
}

func New

func New(apiKey, apiSecret, apiPassphrase string) *KuCoin

func NewWithConfig

func NewWithConfig(config *APIConfig) *KuCoin

func (*KuCoin) Account

func (kc *KuCoin) Account(accountId string) (*kucoin.AccountModel, error)

Account returns an account when you know the accountId.

func (*KuCoin) Accounts

func (kc *KuCoin) Accounts(currency, typo string) (kucoin.AccountsModel, error)

Account Accounts returns a list of accounts.

func (*KuCoin) AllTicker

func (kc *KuCoin) AllTicker(SymPair map[string]q.D) (mdt *sync.Map, err error)

func (*KuCoin) ApplyWithdrawal

func (kc *KuCoin) ApplyWithdrawal(currency, address, amount, memo, isInner, remark, chain string) (string, error)

ApplyWithdrawal applies a withdrawal.

func (*KuCoin) Balances

func (kc *KuCoin) Balances() (availables, frozens *sync.Map, err error)

func (*KuCoin) CancelOrder

func (kc *KuCoin) CancelOrder(orderId string, currency CurrencyPair) (bool, error)

func (*KuCoin) CancelWithdrawal

func (kc *KuCoin) CancelWithdrawal(withdrawalId string) (*kucoin.CancelWithdrawalResultModel, error)

CancelWithdrawal cancels a withdrawal by withdrawalId.

func (*KuCoin) CreateAccount

func (kc *KuCoin) CreateAccount(typo, currency string) (*kucoin.AccountModel, error)

CreateAccount creates an account according to type(main|trade) and currency Parameter #1 typo is type of account.

func (*KuCoin) CreateDepositAddress

func (kc *KuCoin) CreateDepositAddress(currency, chain string) (*kucoin.DepositAddressModel, error)

Deposits CreateDepositAddress creates a deposit address.

func (*KuCoin) DepositAddresses

func (kc *KuCoin) DepositAddresses(currency, chain string) (*kucoin.DepositAddressModel, error)

DepositAddresses returns the deposit address of currency for deposit. If return data is empty, you may need create a deposit address first.

func (*KuCoin) Deposits

func (kc *KuCoin) Deposits(currency, startAt, endAt, status string) (*kucoin.DepositsModel, error)

Deposits returns a list of deposit.

func (*KuCoin) Fee

func (kc *KuCoin) Fee() float64

func (*KuCoin) GetAccount

func (kc *KuCoin) GetAccount() (*Account, error)

func (*KuCoin) GetAttr

func (kc *KuCoin) GetAttr() (a q.Attr)

func (*KuCoin) GetDepth

func (kc *KuCoin) GetDepth(size int, currency CurrencyPair) (*Depth, error)

func (*KuCoin) GetKlineRecords

func (kc *KuCoin) GetKlineRecords(currency CurrencyPair, period KlinePeriod, size int, optional ...OptionalParameter) ([]Kline, error)

func (*KuCoin) GetOneOrder

func (kc *KuCoin) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error)

func (*KuCoin) GetOrderHistorys

func (kc *KuCoin) GetOrderHistorys(currency CurrencyPair, optional ...OptionalParameter) ([]Order, error)

func (*KuCoin) GetTicker

func (kc *KuCoin) GetTicker(currency CurrencyPair) (*Ticker, error)

func (*KuCoin) GetTrades

func (kc *KuCoin) GetTrades(currency CurrencyPair, since int64) ([]Trade, error)

func (*KuCoin) GetUnfinishedOrders

func (kc *KuCoin) GetUnfinishedOrders(currency CurrencyPair) ([]Order, error)

func (*KuCoin) InnerTransfer

func (kc *KuCoin) InnerTransfer(currency, from, to, amount string) (string, error)

The inner transfer interface is used for transferring assets between the accounts of a user and is free of charges. For example, a user could transfer assets from their main account to their trading account on the platform.

func (*KuCoin) LimitBuy

func (kc *KuCoin) LimitBuy(amount, price string, currency CurrencyPair, opt ...LimitOrderOptionalParameter) (*Order, error)

func (*KuCoin) LimitSell

func (kc *KuCoin) LimitSell(amount, price string, currency CurrencyPair, opt ...LimitOrderOptionalParameter) (*Order, error)

func (*KuCoin) MarketBuy

func (kc *KuCoin) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error)

func (*KuCoin) MarketSell

func (kc *KuCoin) MarketSell(amount, price string, currency CurrencyPair) (*Order, error)

func (*KuCoin) OneTicker

func (kc *KuCoin) OneTicker(d q.D) (ticker q.Bbo, err error)

func (*KuCoin) PairArray

func (kc *KuCoin) PairArray() (map[string]q.D, map[q.D]q.P, error)

func (*KuCoin) PlaceOrders

func (kc *KuCoin) PlaceOrders(places [3]q.Order) (orders [3]q.Order, err error)

func (*KuCoin) String

func (kc *KuCoin) String() string

func (*KuCoin) SubAccount

func (kc *KuCoin) SubAccount(subUserId string) (*kucoin.SubAccountModel, error)

SubAccount returns the detail of a sub-account.

func (*KuCoin) SubAccountUsers

func (kc *KuCoin) SubAccountUsers() (kucoin.SubAccountUsersModel, error)

SubAccountUsers returns a list of sub-account user.

func (*KuCoin) SubAccounts

func (kc *KuCoin) SubAccounts() (kucoin.SubAccountsModel, error)

SubAccounts returns the aggregated balance of all sub-accounts of the current user.

func (*KuCoin) SubTransfer

func (kc *KuCoin) SubTransfer(currency, amount, direction, subUserId, accountType, subAccountType string) (string, error)

SubTransfer transfers between master account and sub-account.

func (*KuCoin) Test

func (kc *KuCoin) Test() bool

func (*KuCoin) TradeFee

func (kc *KuCoin) TradeFee() (map[string]q.TradeFee, error)

func (*KuCoin) WithdrawFee

func (kc *KuCoin) WithdrawFee() (sf []q.NetworkWithdraw, err error)

func (*KuCoin) WithdrawalQuotas

func (kc *KuCoin) WithdrawalQuotas(currency, chain string) (*kucoin.WithdrawalQuotasModel, error)

WithdrawalQuotas returns the quotas of withdrawal.

func (*KuCoin) Withdrawals

func (kc *KuCoin) Withdrawals(currency, startAt, endAt, status string) (*kucoin.WithdrawalsModel, error)

Withdrawals Deposits returns a list of deposit.

Jump to

Keyboard shortcuts

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