Emxc.Global.Spot.V3 (emxc v0.0.1)

Link to this section Summary

Functions

Create a client for the private endpoints.

Compressed/Aggregate trades.

Exchange information.

Kline/candlestick bars.

Test connectivity to the Rest API.

Create a client for the public endpoints.

Check server time.

Link to this section Types

Link to this type

authorized_option()

@type authorized_option() :: {:headers, Tesla.Env.headers()} | {:api_key, String.t()}
Link to this type

compressed_trades_option()

@type compressed_trades_option() ::
  {:limit, integer()}
  | {:symbol, String.t()}
  | {:startTime, integer()}
  | {:endTime, integer()}
Link to this type

exchange_info_option()

@type exchange_info_option() :: {:symbol, String.t()} | {:symbols, [String.t()]}
Link to this type

kline_option()

@type kline_option() ::
  {:limit, integer()}
  | {:symbol, String.t()}
  | {:interval, String.t()}
  | {:startTime, integer()}
  | {:endTime, integer()}
Link to this type

order_book_option()

@type order_book_option() :: {:limit, integer()} | {:symbol, String.t()}
Link to this type

public_option()

@type public_option() :: {:headers, Tesla.Env.headers()}
Link to this type

recent_trades_option()

@type recent_trades_option() :: {:limit, integer()} | {:symbol, String.t()}
@type response() :: {:ok, map()} | {:error, any()} | no_return()

Link to this section Functions

Link to this function

authorized(opts \\ [])

@spec authorized(Tesla.Env.headers()) :: Tesla.Client.t()

Create a client for the private endpoints.

Link to this function

compressed_trades(client, opts \\ [])

@spec compressed_trades(Tesla.Client.t(), [compressed_trades_option()]) :: response()

Compressed/Aggregate trades.

options

Options

  • :limit - Default 500; max 1000.
  • :symbol - The symbol to get trades for.
  • :startTime - Timestamp in ms to get aggregate trades from INCLUSIVE.
  • :endTime - Timestamp in ms to get aggregate trades until INCLUSIVE.
Link to this function

exchange_info(client, opts \\ [])

@spec exchange_info(Tesla.Client.t(), [exchange_info_option()]) :: response()

Exchange information.

options

Options

  • :symbol - The symbol to get the exchange information for.
  • :symbols - A list of symbols to get the exchange information for.
Link to this function

kline(client, opts \\ [])

@spec kline(Tesla.Client.t(), [kline_option()]) :: response()

Kline/candlestick bars.

options

Options

  • :limit - Default 500; max 1000.
  • :symbol - The symbol to get klines for.
  • :interval - The interval to get klines for. One of: 1m, 5m, 15m, 30m, 60m, 4h, 1d, 1M.
  • :startTime - The start time to get klines for. In milliseconds.
  • :endTime - The end time to get klines for. In milliseconds.
Link to this function

order_book(client, opts \\ [])

@spec order_book(Tesla.Client.t(), [order_book_option()]) :: response()

Order book.

options

Options

  • :limit - Default 100; max 1000.
  • :symbol - The symbol to get the order book for.
@spec ping(Tesla.Client.t()) :: response()

Test connectivity to the Rest API.

Link to this function

public(opts \\ [])

@spec public([public_option()]) :: Tesla.Client.t()

Create a client for the public endpoints.

Link to this function

recent_trades(client, opts \\ [])

@spec recent_trades(Tesla.Client.t(), [recent_trades_option()]) :: response()

Recent trades.

options

Options

  • :limit - Default 500; max 1000.
  • :symbol - The symbol to get trades for.
@spec time(Tesla.Client.t()) :: response()

Check server time.