Documentation ¶
Index ¶
- type Balance
- type Beneficiary
- type BlockchainCurrency
- type ChangeDepositStateParams
- type Client
- func (p *Client) ChangeDepositState(params ChangeDepositStateParams) (*Deposit, *mngapi.APIError)
- func (p *Client) CreateBeneficiary(params CreateBeneficiaryParams) (*Beneficiary, *mngapi.APIError)
- func (p *Client) CreateBlockchainCurrency(params CreateBlockchainCurrencyParams) (*BlockchainCurrency, *mngapi.APIError)
- func (p *Client) CreateCurrency(params CreateCurrencyParams) (*Currency, *mngapi.APIError)
- func (p *Client) CreateDeposit(params CreateDepositParams) (*Deposit, *mngapi.APIError)
- func (p *Client) CreateEngine(params CreateEngineParams) (*Engine, *mngapi.APIError)
- func (p *Client) CreateMarket(params CreateMarketParams) (*Market, *mngapi.APIError)
- func (p *Client) CreateMember(params CreateMemberParams) (*Member, *mngapi.APIError)
- func (p *Client) CreateWallet(params CreateWalletParams) (*Wallet, *mngapi.APIError)
- func (p *Client) CreateWithdraw(params CreateWithdrawParams) (*Withdraw, *mngapi.APIError)
- func (p *Client) GenerateDepositAddress(params GenerateDepositAddressParams) (*PaymentAddress, *mngapi.APIError)
- func (p *Client) GetAccountBalance(params GetAccountBalanceParams) (*Balance, *mngapi.APIError)
- func (p *Client) GetBeneficiaries(params GetBeneficiariesParams) (*[]Beneficiary, *mngapi.APIError)
- func (p *Client) GetBlockchainCurrencyByID(id string) (*BlockchainCurrency, *mngapi.APIError)
- func (p *Client) GetCurrenciesList(params CurrenciesListParams) (*[]Currency, *mngapi.APIError)
- func (p *Client) GetCurrencyByCode(code string) (*Currency, *mngapi.APIError)
- func (p *Client) GetDepositByID(tid string) (*Deposit, *mngapi.APIError)
- func (p *Client) GetDeposits(params GetDepositsParams) ([]*Deposit, *mngapi.APIError)
- func (p *Client) GetEngines(params GetEngineParams) ([]*Engine, *mngapi.APIError)
- func (p *Client) GetMarketByID(id string) (*Market, *mngapi.APIError)
- func (p *Client) GetMarkets() ([]*Market, *mngapi.APIError)
- func (p *Client) GetWalletByID(id int) (*Wallet, *mngapi.APIError)
- func (p *Client) GetWallets() ([]*Wallet, *mngapi.APIError)
- func (p *Client) GetWithdrawByID(tid string) (*Withdraw, *mngapi.APIError)
- func (p *Client) GetWithdrawsList(params WithdrawsListParams) (*[]Withdraw, *mngapi.APIError)
- func (p *Client) PerformActionOnWithdraw(params PerformActionOnWithdrawParams) (*Withdraw, *mngapi.APIError)
- func (p *Client) UpdateBlockchainCurrency(params UpdateBlockchainCurrencyParams) (*BlockchainCurrency, *mngapi.APIError)
- func (p *Client) UpdateCurrency(params UpdateCurrencyParams) (*Currency, *mngapi.APIError)
- func (p *Client) UpdateEngine(params UpdateEngineParams) (*Engine, *mngapi.APIError)
- func (p *Client) UpdateMarket(params UpdateMarketParams) (*Market, *mngapi.APIError)
- func (p *Client) UpdateWallet(params UpdateWalletParams) (*Wallet, *mngapi.APIError)
- type CreateBeneficiaryParams
- type CreateBlockchainCurrencyParams
- type CreateCurrencyParams
- type CreateDepositParams
- type CreateEngineParams
- type CreateMarketParams
- type CreateMemberParams
- type CreateWalletParams
- type CreateWithdrawParams
- type CurrenciesListParams
- type Currency
- type Deposit
- type Engine
- type GenerateDepositAddressParams
- type GetAccountBalanceParams
- type GetBeneficiariesParams
- type GetDepositsParams
- type GetEngineParams
- type Market
- type Member
- type PaymentAddress
- type PerformActionOnWithdrawParams
- type Settings
- type UpdateBlockchainCurrencyParams
- type UpdateCurrencyParams
- type UpdateEngineParams
- type UpdateMarketParams
- type UpdateWalletParams
- type Wallet
- type Withdraw
- type WithdrawsListParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beneficiary ¶
type BlockchainCurrency ¶
type BlockchainCurrency struct { ID string `json:"id"` CurrencyID string `json:"currency_id"` BlockchainKey string `json:"blockchain_key"` ParentID string `json:"parent_id"` Status string `json:"status"` DepositEnabled bool `json:"deposit_enabled"` WithdrawEnabled bool `json:"withdrawal_enabled"` DepositFee string `json:"deposit_fee"` MinDepositAmount string `json:"min_deposit_amount"` WithdrawFee string `json:"withdraw_fee"` MinWithdrawAmount string `json:"min_withdraw_amount"` BaseFactor uint64 `json:"base_factor"` MinCollectionAmount string `json:"min_collection_amount"` Options map[string]interface{} `json:"options"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is peatio management api client instance
func (*Client) ChangeDepositState ¶
func (p *Client) ChangeDepositState(params ChangeDepositStateParams) (*Deposit, *mngapi.APIError)
func (*Client) CreateBeneficiary ¶
func (p *Client) CreateBeneficiary(params CreateBeneficiaryParams) (*Beneficiary, *mngapi.APIError)
func (*Client) CreateBlockchainCurrency ¶
func (p *Client) CreateBlockchainCurrency(params CreateBlockchainCurrencyParams) (*BlockchainCurrency, *mngapi.APIError)
func (*Client) CreateCurrency ¶
func (p *Client) CreateCurrency(params CreateCurrencyParams) (*Currency, *mngapi.APIError)
func (*Client) CreateDeposit ¶
func (p *Client) CreateDeposit(params CreateDepositParams) (*Deposit, *mngapi.APIError)
CreateDeposit call peatio management api to create new deposit
func (*Client) CreateEngine ¶
func (p *Client) CreateEngine(params CreateEngineParams) (*Engine, *mngapi.APIError)
CreateEngine call peatio management api to create new engine
func (*Client) CreateMarket ¶
func (p *Client) CreateMarket(params CreateMarketParams) (*Market, *mngapi.APIError)
func (*Client) CreateMember ¶
func (p *Client) CreateMember(params CreateMemberParams) (*Member, *mngapi.APIError)
func (*Client) CreateWallet ¶
func (p *Client) CreateWallet(params CreateWalletParams) (*Wallet, *mngapi.APIError)
CreateWallet call peatio management api to create wallet
func (*Client) CreateWithdraw ¶
func (p *Client) CreateWithdraw(params CreateWithdrawParams) (*Withdraw, *mngapi.APIError)
CreateWithdraw call peatio management api to create new withdraw
func (*Client) GenerateDepositAddress ¶
func (p *Client) GenerateDepositAddress(params GenerateDepositAddressParams) (*PaymentAddress, *mngapi.APIError)
GenerateDepositAddress call peatio management api to generate new deposit address
func (*Client) GetAccountBalance ¶
func (p *Client) GetAccountBalance(params GetAccountBalanceParams) (*Balance, *mngapi.APIError)
GetAccountBalance call peatio management api to get account balance
func (*Client) GetBeneficiaries ¶
func (p *Client) GetBeneficiaries(params GetBeneficiariesParams) (*[]Beneficiary, *mngapi.APIError)
func (*Client) GetBlockchainCurrencyByID ¶
func (p *Client) GetBlockchainCurrencyByID(id string) (*BlockchainCurrency, *mngapi.APIError)
GetBlockchainCurrencyByID call peatio management api to get blockchain currency information by id
func (*Client) GetCurrenciesList ¶
func (p *Client) GetCurrenciesList(params CurrenciesListParams) (*[]Currency, *mngapi.APIError)
GetCurrenciesList call peatio management api to get currency information by code name
func (*Client) GetCurrencyByCode ¶
GetCurrencyByCode call peatio management api to get currency information by code name
func (*Client) GetDepositByID ¶
GetDepositByID call peatio management api to get deposit information by transaction ID
func (*Client) GetDeposits ¶
func (p *Client) GetDeposits(params GetDepositsParams) ([]*Deposit, *mngapi.APIError)
GetDeposits call peatio management api to get deposits as paginated collection
func (*Client) GetEngines ¶
func (p *Client) GetEngines(params GetEngineParams) ([]*Engine, *mngapi.APIError)
GetEngines call peatio management api to get engines
func (*Client) GetMarketByID ¶
func (*Client) GetMarkets ¶
GetMarkets call peatio management api to get all markets
func (*Client) GetWallets ¶
GetWallets call peatio management api to get wallets
func (*Client) GetWithdrawByID ¶
GetWithdrawByID call peatio management api to get withdraw information by transaction ID
func (*Client) GetWithdrawsList ¶
func (p *Client) GetWithdrawsList(params WithdrawsListParams) (*[]Withdraw, *mngapi.APIError)
GetCurrenciesList call peatio management api to get currency information by code name
func (*Client) PerformActionOnWithdraw ¶
func (p *Client) PerformActionOnWithdraw(params PerformActionOnWithdrawParams) (*Withdraw, *mngapi.APIError)
/--- PerformActionOnWithdraw calls peatio manaagement api to perform action on withdraw
func (*Client) UpdateBlockchainCurrency ¶
func (p *Client) UpdateBlockchainCurrency(params UpdateBlockchainCurrencyParams) (*BlockchainCurrency, *mngapi.APIError)
func (*Client) UpdateCurrency ¶
func (p *Client) UpdateCurrency(params UpdateCurrencyParams) (*Currency, *mngapi.APIError)
func (*Client) UpdateEngine ¶
func (p *Client) UpdateEngine(params UpdateEngineParams) (*Engine, *mngapi.APIError)
UpdateEngine call peatio management api to update engine
func (*Client) UpdateMarket ¶
func (p *Client) UpdateMarket(params UpdateMarketParams) (*Market, *mngapi.APIError)
UpdateMarket call peatio management api to update market
func (*Client) UpdateWallet ¶
func (p *Client) UpdateWallet(params UpdateWalletParams) (*Wallet, *mngapi.APIError)
UpdateWallet call peatio management api to update wallet
type CreateBeneficiaryParams ¶
type CreateBlockchainCurrencyParams ¶
type CreateBlockchainCurrencyParams struct { CurrencyID string `json:"currency_id"` BlockchainKey string `json:"blockchain_key,omitempty"` BaseFactor int64 `json:"base_factor,omitempty"` ParentID string `json:"parent_id,omitempty"` DepositFee string `json:"deposit_fee,omitempty"` MinDepositAmount string `json:"min_deposit_amount,omitempty"` MinCollectionAmount string `json:"min_collection_amount,omitempty"` WithdrawFee string `json:"withdraw_fee,omitempty"` MinWithdrawAmount string `json:"min_withdraw_amount,omitempty"` DepositEnabled bool `json:"deposit_enabled,omitempty"` WithdrawEnabled bool `json:"withdrawal_enabled,omitempty"` Status string `json:"status,omitempty"` Options datatypes.JSONMap `json:"options"` }
type CreateCurrencyParams ¶
type CreateCurrencyParams struct { Code string `json:"code"` Type string `json:"type,omitempty"` Position int64 `json:"position,omitempty"` Name string `json:"name,omitempty"` Precision int64 `json:"precision,omitempty"` Price string `json:"price,omitempty"` Status string `json:"status,omitempty"` IconURL string `json:"icon_url,omitempty"` Description string `json:"description,omitempty"` Homepage string `json:"homepage,omitempty"` }
type CreateDepositParams ¶
type CreateEngineParams ¶
type CreateMarketParams ¶
type CreateMarketParams struct { BaseCurrency string `json:"base_currency"` QuoteCurrency string `json:"quote_currency"` State string `json:"state"` EngineName string `json:"engine_name"` AmountPrecision int64 `json:"amount_precision"` PricePrecision int64 `json:"price_precision"` MinPrice string `json:"min_price"` MaxPrice string `json:"max_price"` MinAmount string `json:"min_amount"` Position int64 `json:"position"` }
type CreateMemberParams ¶
type CreateWalletParams ¶
type CreateWalletParams struct { BlockchainKey string `json:"blockchain_key"` Name string `json:"name"` Kind string `json:"kind"` Gateway string `json:"gateway"` Address string `json:"address"` Currencies pq.StringArray `json:"currencies,omitempty"` Settings Settings `json:"settings,omitempty" gorm:"embedded;embedded_prefix:set_"` MaxBalance string `json:"max_balance,omitempty"` Status string `json:"status,omitempty"` }
type CreateWithdrawParams ¶
type CreateWithdrawParams struct { UID string `json:"uid"` TID string `json:"tid,omitempty"` RID string `json:"rid,omitempty"` BeneficiaryID string `json:"beneficiary_id,omitempty"` BlockchainKey string `json:"blockchain_key"` Currency string `json:"currency"` Amount float64 `json:"amount"` Note string `json:"note,omitempty"` Action string `json:"action,omitempty"` TransferType string `json:"transfer_type,omitempty"` AdditionalFee bool `json:"additional_fee,omitempty"` }
type CurrenciesListParams ¶
type CurrenciesListParams struct {
Type string `json:"type,omitempty"`
}
type Currency ¶
type Currency struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Homepage string `json:"homepage"` Price string `json:"price"` Status string `json:"status"` Type string `json:"type"` Precision uint64 `json:"precision"` Position uint64 `json:"position"` IconURL string `json:"icon_url"` Code string `json:"code"` Networks []BlockchainCurrency `json:"networks"` }
type Deposit ¶
type Deposit struct { ID uint64 `json:"id"` TID string `json:"tid"` BlockchainKey string `json:"blockchain_key"` Currency string `json:"currency"` Address string `json:"address"` UID string `json:"uid"` Type string `json:"type"` Amount string `json:"amount"` State string `json:"state"` CreatedAt string `json:"created_at"` CompletedAt *string `json:"completed_at"` BlockchainTxID string `json:"blockchain_txid,omitempty"` BlockchainConfirmations string `json:"blockchain_confirmations,omitempty"` TransferType string `json:"transfer_type"` }
type GetAccountBalanceParams ¶
type GetBeneficiariesParams ¶
type GetDepositsParams ¶
type GetDepositsParams struct { UID string `json:"uid,omitempty"` FromID int64 `json:"from_id,omitempty"` Currency string `json:"currency,omitempty"` BlockchainKey string `json:"blockchain_key,omitempty"` Page int64 `json:"page,omitempty"` Limit int64 `json:"limit,omitempty"` State string `json:"state,omitempty"` }
type GetEngineParams ¶
type GetEngineParams struct {
Name string `json:"name"`
}
type Market ¶
type Market struct { ID string `json:"id"` Name string `json:"name"` BaseUnit string `json:"base_unit"` QuoteUnit string `json:"quote_unit"` MinPrice string `json:"min_price"` MaxPrice string `json:"max_price"` MinAmount string `json:"min_amount"` AmountPrecision int `json:"amount_precision"` PricePrecision int `json:"price_precision"` State string `json:"state"` Position int `json:"position"` EngineID int `json:"engine_id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type PaymentAddress ¶
type UpdateBlockchainCurrencyParams ¶
type UpdateBlockchainCurrencyParams struct { ID string `json:"id"` DepositFee string `json:"deposit_fee,omitempty"` MinDepositAmount string `json:"min_deposit_amount,omitempty"` MinCollectionAmount string `json:"min_collection_amount,omitempty"` WithdrawFee string `json:"withdraw_fee,omitempty"` MinWithdrawAmount string `json:"min_withdraw_amount,omitempty"` DepositEnabled bool `json:"deposit_enabled,omitempty"` WithdrawEnabled bool `json:"withdrawal_enabled,omitempty"` Status string `json:"status,omitempty"` Options datatypes.JSONMap `json:"options"` }
type UpdateCurrencyParams ¶
type UpdateEngineParams ¶
type UpdateMarketParams ¶
type UpdateMarketParams struct { ID string `json:"id"` EngineID string `json:"engine_id,omitempty"` MinPrice string `json:"min_price,omitempty"` MaxPrice string `json:"max_price,omitempty"` MinAmount string `json:"min_amount,omitempty"` AmountPrecision int64 `json:"amount_precision,omitempty"` PricePrecision int64 `json:"price_precision,omitempty"` }
type UpdateWalletParams ¶
type UpdateWalletParams struct { ID string `json:"id"` BlockchainKey string `json:"blockchain_key,omitempty"` Name string `json:"name,omitempty"` Address string `json:"address,omitempty"` Gateway string `json:"gateway,omitempty"` Kind string `json:"kind,omitempty"` Currencies pq.StringArray `json:"currencies,omitempty"` Settings Settings `json:"settings,omitempty" gorm:"embedded;embedded_prefix:set_"` MaxBalance string `json:"max_balance,omitempty"` Status string `json:"status,omitempty"` }
type Wallet ¶
type Wallet struct { ID int `json:"id"` Name string `json:"name"` Kind string `json:"kind"` Currencies []string `json:"currencies"` Address string `json:"address"` Gateway string `json:"gateway"` MaxBalance string `json:"max_balance"` Balance map[string]interface{} `json:"balance"` BlockchainKey string `json:"blockchain_key"` Status string `json:"status"` }
type Withdraw ¶
type Withdraw struct { TID string `json:"tid"` UID string `json:"uid"` Currency string `json:"currency"` BlockchainKey string `json:"blockchain_key"` Note string `json:"note"` Type string `json:"type"` Amount string `json:"amount"` Fee string `json:"fee"` RID string `json:"rid"` State string `json:"state"` CreatedAt string `json:"created_at"` BlockchainTxID string `json:"blockchain_txid"` TransferType string `json:"transfer_type"` }