Documentation ¶
Overview ¶
Account Asset (https://bybit-exchange.github.io/docs/account_asset/#t-introduction)
Enums Definitions (https://bybit-exchange.github.io/docs/account_asset/#t-enums)
Transfer Data Endpoints (https://bybit-exchange.github.io/docs/account_asset/#t-transfer_api)
Index ¶
- func Get[T any](c *Client, path string, param any) (T, error)
- func Post[T any](c *Client, path string, param any) (T, error)
- type AccountType
- type Client
- func (this *Client) CreateInternalTransfer(v CreateInternalTransfer) (string, error)
- func (this *Client) Get(path string, param any, ret any) error
- func (this *Client) Post(path string, param any, ret any) error
- func (this *Client) QueryInternalTransferList(v QueryInternalTransferList) (InternalTransfers, error)
- func (this *Client) Transport() *transport.Client
- type CreateInternalTransfer
- type InternalTransfer
- type InternalTransfers
- type OperatorType
- type PageDirection
- type QueryInternalTransferList
- type Response
- type TransferStatus
- type TransferType
- type Withdraw
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountType ¶
type AccountType string
Account type (from_account_type/to_account_type) (https://bybit-exchange.github.io/docs/account_asset/#account-type-from_account_type-to_account_type)
const ( AccountContract AccountType = "CONTRACT" AccountSpot AccountType = "SPOT" AccountInvestment AccountType = "INVESTMENT" AccountOption AccountType = "OPTION" AccountUnified AccountType = "UNIFIED" )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Account Asset HTTP client
func (*Client) CreateInternalTransfer ¶
func (this *Client) CreateInternalTransfer(v CreateInternalTransfer) (string, error)
func (*Client) QueryInternalTransferList ¶
func (this *Client) QueryInternalTransferList(v QueryInternalTransferList) (InternalTransfers, error)
type CreateInternalTransfer ¶
type CreateInternalTransfer struct { // param as json on body TransferID string `json:"transfer_id"` Coin string `json:"coin"` Amount string `json:"amount"` FromAccountType string `json:"from_account_type"` ToAccountType string `json:"to_account_type"` }
Create Internal Transfer (https://bybit-exchange.github.io/docs/account_asset/#t-createinternaltransfer)
type InternalTransfer ¶
type InternalTransfer struct { TransferID string `json:"transfer_id"` Coin string `json:"coin"` Amount string `json:"amount"` FromAccountType AccountType `json:"from_account_type"` ToAccountType AccountType `json:"to_account_type"` Timestamp string `json:"timestamp"` Status TransferStatus `json:"status"` }
type InternalTransfers ¶
type InternalTransfers struct { List []InternalTransfer `json:"list"` Cursor string `json:"cursor"` }
type OperatorType ¶
type OperatorType string
Operator type (https://bybit-exchange.github.io/docs/account_asset/#operator-type)
const ( OperatorSystem OperatorType = "SYSTEM" OperatorUser OperatorType = "USER" OperatorAdmin OperatorType = "ADMIN" OperatorAffiliateUser OperatorType = "AFFILIATE_USER" )
type PageDirection ¶
type PageDirection string
Page direction (direction) (https://bybit-exchange.github.io/docs/account_asset/#page-direction-direction)
const ( PagePrev PageDirection = "Prev" PageNext PageDirection = "Next" )
type QueryInternalTransferList ¶
type QueryInternalTransferList struct { TransferID *string `param:"transfer_id"` Coin *string `param:"coin"` Status *TransferStatus `param:"status"` StartTime *int `param:"start_time"` EndTime *int `param:"end_time"` Direction *PageDirection `param:"direction"` Limit *int `param:"limit"` Cursor *string `param:"cursor"` }
Query Internal Transfer List (https://bybit-exchange.github.io/docs/account_asset/#t-querytransferlist)
func (QueryInternalTransferList) Do ¶
func (this QueryInternalTransferList) Do(client *Client) (InternalTransfers, error)
type TransferStatus ¶
type TransferStatus string
Transfer status (status) (https://bybit-exchange.github.io/docs/account_asset/#transfer-status-status)
const ( TransferSuccess TransferStatus = "SUCCESS" TransferPending TransferStatus = "PENDING" TransferFailed TransferStatus = "FAILED" )
type TransferType ¶
type TransferType string
Transfer type (type) (https://bybit-exchange.github.io/docs/account_asset/#transfer-type-type)
const ( TransferIn TransferType = "IN" TransferOut TransferType = "OUT" )
type Withdraw ¶
type Withdraw string
Withdraw status (status) (https://bybit-exchange.github.io/docs/account_asset/#withdraw-status-status)
const ( WithdrawSecurityCheck Withdraw = "SecurityCheck" WithdrawPending Withdraw = "Pending" WithdrawSuccess Withdraw = "success" WithdrawCancelByUser Withdraw = "CancelByUser" WithdrawReject Withdraw = "Reject" WithdrawFail Withdraw = "Fail" WithdrawBlockchainConfirmed Withdraw = "BlockchainConfirmed" )