Documentation ¶
Index ¶
- Constants
- func GetOrderedParameters(params map[string]interface{}) string
- type Client
- func (c *Client) Get(endpoint string, params map[string]interface{}) ([]byte, error)
- func (c *Client) Post(endpoint string, data map[string]interface{}) ([]byte, error)
- func (c *Client) PrepareRequest(method, endpoint, endpointUrl string, extraParams map[string]interface{}) error
- func (c *Client) PrepareSignedRequest(method, endpoint, endpointUrl string, extraParams map[string]interface{}) error
- func (c *Client) Sign(payload string) (string, error)
- type SignatureFunc
Constants ¶
const (
ErrRateLimited = "bybit: rate limited, should wait %d ms"
)
Constants used to define errors.
const (
Url = "https://api.bybit.com"
)
Variables ¶
This section is empty.
Functions ¶
func GetOrderedParameters ¶
GetOrderedParameters is used to build a string with the passed parameters ordered alphabetically.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the REST API Client for FTX.
func NewClient ¶
func NewClient(cfg *config.Configuration) (*Client, error)
NewClient returns a new rest client for ftx
func (*Client) Get ¶
Get fetches the information.
This method is only implemented in every exchange in case some specific action must be taken before processing the request, which generally it does, due to authentication, etc.
func (*Client) Post ¶
Post submits information.
This method is only implemented in every exchange in case some specific action must be taken before processing the request, which generally it does, due to authentication, etc.
func (*Client) PrepareRequest ¶
func (c *Client) PrepareRequest(method, endpoint, endpointUrl string, extraParams map[string]interface{}) error
PrepareRequest is used to prepare the request with the necessary information, including authentication info