Emxc.Global.Spot.V3 (emxc v0.0.2)
Link to this section Summary
Market Data
Compressed/Aggregate trades.
Exchange information.
Kline/candlestick bars.
Order book.
Test connectivity to the Rest API.
Recent trades.
Check server time.
Link to this section Types
Link to this type
authorized_option()
Link to this type
client()
@type client() :: Tesla.Client.t()
Link to this type
compressed_trades_option()
Link to this type
exchange_info_option()
Link to this type
headers()
@type headers() :: Tesla.Env.headers()
Link to this type
kline_option()
Link to this type
order_book_option()
Link to this type
public_option()
@type public_option() :: {:headers, headers()}
Link to this type
recent_trades_option()
Link to this type
response()
Link to this section API
Link to this function
authorized_client(opts \\ [])
@spec authorized_client(Tesla.Env.headers()) :: client()
Create a client for the private endpoints.
Link to this function
public_client(opts \\ [])
@spec public_client([public_option()]) :: client()
Create a client for the public endpoints.
Link to this section Market Data
Link to this function
compressed_trades(client, opts \\ [])
@spec compressed_trades(client(), [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(client(), [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(client(), [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(client(), [order_book_option()]) :: response()
Order book.
options
Options
:limit
- Default 100; max 1000.:symbol
- The symbol to get the order book for.
Link to this function
ping(client)
Test connectivity to the Rest API.
Link to this function
recent_trades(client, opts \\ [])
@spec recent_trades(client(), [recent_trades_option()]) :: response()
Recent trades.
options
Options
:limit
- Default 500; max 1000.:symbol
- The symbol to get trades for.
Link to this function
time(client)
Check server time.