defmodule Bingex.Types do @moduledoc """ Provides general types. """ alias Bingex.{HTTP, API} @type timestamp() :: non_neg_integer() @type request_ok_metadata() :: {HTTP.Request.t(), HTTP.Response.t()} @type request_error_metadata() :: HTTP.Request.t() @type request_ok_result(reply) :: {:ok, reply, request_ok_metadata()} @type request_ok_result() :: {:ok, API.Reply.t(), request_ok_metadata()} @type request_http_error_result() :: {:error, HTTP.Error.t(), request_error_metadata()} @type request_api_error_result() :: {:error, API.Error.t(), request_ok_metadata()} @type request_error_result() :: request_http_error_result() | request_api_error_result() @type request_result(reply) :: request_ok_result(reply) | request_error_result() @type request_result() :: request_ok_result() | request_error_result() @type leverage() :: pos_integer() @type symbol() :: binary() @type api_key() :: binary() @type secret_key() :: binary() @type listen_key() :: binary() @type income_type() :: :transfer | :realized_pnl | :funding_fee | :trading_fee @type position_side() :: :long | :short | :both @type user_id() :: binary() end