View Source Hyperliquid.Api (hyperliquid v0.1.6)
A base API macro for interacting with the Hyperliquid API.
This module provides a macro that sets up common functionality for API interactions, including signing requests, handling different types of actions, and processing responses.
When used, it imports necessary modules, sets up aliases, and defines several helper functions for making API calls.
Usage
Use this module in other API-specific modules like this:
use Hyperliquid.Api, context: "evm"
Configuration
This module relies on the following application environment variables:
:http_url
- The base URL for API requests:is_mainnet
- Boolean indicating whether to use mainnet or testnet:private_key
- The private key used for signing requests