0.0
No release in over 3 years
A Ruby SDK for interacting with Hyperliquid's decentralized exchange API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.5
~> 1.7
~> 1.0.1
~> 2.0
 Project Readme

Hyperliquid Ruby SDK

Gem Version Downloads CI

A Ruby SDK for interacting with the Hyperliquid decentralized exchange API.

Full-featured SDK with Info API (market data), Exchange API (trading), real-time WebSocket streaming, and HIP-3 builder-deployed perpetuals support.

Installation

Add this line to your application's Gemfile:

gem 'hyperliquid'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install hyperliquid

Usage

Basic Setup

require 'hyperliquid'

# Create SDK instance for read-only operations (mainnet by default)
sdk = Hyperliquid.new

# Or use testnet
testnet_sdk = Hyperliquid.new(testnet: true)

# Access the Info API (read operations)
info = sdk.info

# For trading operations, provide a private key
trading_sdk = Hyperliquid.new(
  testnet: true,
  private_key: ENV['HYPERLIQUID_PRIVATE_KEY']
)

# Access the Exchange API (write operations)
exchange = trading_sdk.exchange

Documentation

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/carter2099/hyperliquid.

License

The gem is available as open source under the terms of the MIT License.