Documentation
¶
Index ¶
- Constants
- func Call(c *CallParams, a any)
- func DeSerialize(data []byte) any
- func GetEnv(key string) string
- func Recast(a, b any) error
- func Serialize(s any) []byte
- func StringToBool(value string) bool
- func StringToFloat64(value string) float64
- func StringToInt32(value string) int32
- func StringToInt64(value string) int64
- type CallParams
- type Connector
- func (c *Connector) GetRequest() ([]byte, int)
- func (c *Connector) PostRequest() ([]byte, int)
- func (c *Connector) SetEndPoint(value string) *Connector
- func (c *Connector) SetKeys(key, secret string) *Connector
- func (c *Connector) SetParams(p interface{}, required []string) *Connector
- func (c *Connector) SetUrl(mode string) *Connector
- type Response
Constants ¶
View Source
const ( TESTNET_URL = "https://api-testnet.bybit.com" MAINNET_URL = "https://api.bybit.com" )
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(c *CallParams, a any)
func DeSerialize ¶
func StringToBool ¶
func StringToFloat64 ¶
func StringToInt32 ¶
func StringToInt64 ¶
Types ¶
type CallParams ¶
type Connector ¶
type Connector struct {
Params interface{} //request params
Required []string //required fields
Url string //main, or test api url
EndPoint string //api endpoint method
ApiKey string //user api key
ApiSecret string //user api secret
RecvWindow string //recvwindow= 5000 default
Signature string //user signature
// contains filtered or unexported fields
}
func NewConnector ¶
func NewConnector() *Connector
func (*Connector) GetRequest ¶
func (*Connector) PostRequest ¶
func (*Connector) SetEndPoint ¶
Click to show internal directories.
Click to hide internal directories.