Tradehub.Account (Tradehub v0.1.7) View Source
This module enable a power to help developers interacting with public endpoints that focusing on the account and profile information.
Link to this section Summary
Functions
Request information about the given account
.
Request the wallet address which is represented by a username.
Get profile from a TradeHub Wallet.
Check if the given username
has been taken.
Link to this section Functions
Specs
account(any()) :: {:error, HTTPoison.Error.t()} | {:ok, Tradehub.account()}
Request information about the given account
.
This endpoint returns numbers which are NOT human readable values. Consider base_precision
and
quote_precision
to calculate a multiplication factor = 10 ^ (base_precision
- quote_precisions
).
Examples
iex> Tradehub.Account.account("swth1945upvdn2p2sgq7muyhfmygn3fu740jw9l73du")
Specs
address(Tradehub.text()) :: {:error, HTTPoison.Error.t()} | {:ok, Tradehub.address()}
Request the wallet address which is represented by a username.
If no address is found an exception with status code 404 will be raised.
Examples
iex> Tradehub.Account.address("tradehub")
Specs
profile(Tradehub.address()) :: {:error, HTTPoison.Error.t()} | {:ok, Tradehub.profile()}
Get profile from a TradeHub Wallet.
Examples
iex> Tradehub.Account.profile("swth1945upvdn2p2sgq7muyhfmygn3fu740jw9l73du")
Specs
username?(Tradehub.text()) :: {:error, HTTPoison.Error.t()} | {:ok, boolean()}
Check if the given username
has been taken.
Examples
iex> Tradehub.Account.username?("tradehub")