Bingex.HTTP.Request (Bingex v0.1.13)

Represents HTTP request payload for the BingX API.

Summary

Types

body()

@type body() :: nil | binary()

headers()

@type headers() :: [{binary(), binary()}]

method()

@type method() :: :get | :put | :post | :delete

options()

@type options() :: [{:sign, nil | binary()}]

params()

@type params() :: [{binary(), term()}]

path()

@type path() :: binary()

t()

@type t() :: %Bingex.HTTP.Request{
  body: nil | binary(),
  headers: [{binary(), binary()}],
  method: method(),
  url: binary()
}

url()

@type url() :: binary()

Functions

auth_headers(headers \\ [], api_key)

@spec auth_headers(headers(), Bingex.Types.api_key()) :: headers()

build_url(path \\ "/", params \\ [], options \\ [])

@spec build_url(path(), params(), options()) :: url :: binary()

new(method, url, headers, body)

@spec new(method(), url(), headers(), body()) :: t()

set_recv_window(params, value \\ 5000)

@spec set_recv_window(params(), value :: pos_integer()) :: params()

set_signature(params, secret_key)

@spec set_signature(params(), Bingex.Types.secret_key()) :: params()

set_timestamp(params)

@spec set_timestamp(params()) :: params()