hyperliquid 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +5 -5
- data/lib/hyperliquid/info.rb +43 -0
- data/lib/hyperliquid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e872be045b5d2e21d4e2da9faf5ed12ef61f5d8310eeb3bb3c87afd07c43717
|
|
4
|
+
data.tar.gz: f334156a2da8a6abb437872af50b28cab0e5422174e310f867dc410852c2b24b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0dbeff4e433947d992a24bf6c288a6395ed2f7b1ec81d9105140444964579e15ee618baf4082cf91b1b1f22e52997c59c0993a83cb0db787c19becc4432c9cd
|
|
7
|
+
data.tar.gz: 3a5072eb52fd23b6b3729f96eb21570d2fcf25d7424aa39b1bdf387740816a81cbec2a2614bd7a8fe45f104a3ef03beb0640391064a6cd2140bb6c42cabd596b
|
data/CHANGELOG.md
CHANGED
|
@@ -2,4 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [0.1.0] - 2025-08-21
|
|
4
4
|
|
|
5
|
-
- Initial release
|
|
5
|
+
- Initial release which includes info endpoints for market and user perps data
|
|
6
|
+
|
|
7
|
+
## [0.1.1] - 2025-09-23
|
|
8
|
+
|
|
9
|
+
- Fixed retry logic, make retry logic disabled by default
|
|
10
|
+
|
|
11
|
+
## [0.2.0] - 2025-09-24
|
|
12
|
+
|
|
13
|
+
- Add info endpoints for user spot data
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A Ruby SDK for interacting with the Hyperliquid decentralized exchange API.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The latest version is v0.2.0 - a read-only implementation focusing on the Info API endpoints for market data, user information, and order book data.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -208,11 +208,11 @@ rake rubocop
|
|
|
208
208
|
|
|
209
209
|
## Roadmap
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
The latest version is v0.2.0 with read-only Info API support. Future versions will include:
|
|
212
212
|
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
213
|
+
- Trading API (place orders, cancel orders, etc.)
|
|
214
|
+
- WebSocket support for real-time data
|
|
215
|
+
- Advanced trading features
|
|
216
216
|
|
|
217
217
|
## Contributing
|
|
218
218
|
|
data/lib/hyperliquid/info.rb
CHANGED
|
@@ -78,5 +78,48 @@ module Hyperliquid
|
|
|
78
78
|
}
|
|
79
79
|
})
|
|
80
80
|
end
|
|
81
|
+
|
|
82
|
+
# ============================
|
|
83
|
+
# Spot-specific info endpoints
|
|
84
|
+
# ============================
|
|
85
|
+
|
|
86
|
+
# Get spot metadata
|
|
87
|
+
# @return [Hash] Spot tokens and universe metadata
|
|
88
|
+
def spot_meta
|
|
89
|
+
@client.post(Constants::INFO_ENDPOINT, { type: 'spotMeta' })
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Get spot metadata and asset contexts
|
|
93
|
+
# @return [Array] [spot_meta, spot_asset_ctxs]
|
|
94
|
+
def spot_meta_and_asset_ctxs
|
|
95
|
+
@client.post(Constants::INFO_ENDPOINT, { type: 'spotMetaAndAssetCtxs' })
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Get a user's spot token balances
|
|
99
|
+
# @param user [String] Wallet address
|
|
100
|
+
# @return [Hash] Object containing balances array
|
|
101
|
+
def spot_balances(user)
|
|
102
|
+
@client.post(Constants::INFO_ENDPOINT, { type: 'spotClearinghouseState', user: user })
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Get Spot Deploy Auction state for a user
|
|
106
|
+
# @param user [String] Wallet address
|
|
107
|
+
# @return [Hash] Spot deploy state
|
|
108
|
+
def spot_deploy_state(user)
|
|
109
|
+
@client.post(Constants::INFO_ENDPOINT, { type: 'spotDeployState', user: user })
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Get Spot Pair Deploy Auction status
|
|
113
|
+
# @return [Hash] Auction timing and gas parameters
|
|
114
|
+
def spot_pair_deploy_auction_status
|
|
115
|
+
@client.post(Constants::INFO_ENDPOINT, { type: 'spotPairDeployAuctionStatus' })
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Get token details by tokenId
|
|
119
|
+
# @param token_id [String] 34-character hexadecimal token id
|
|
120
|
+
# @return [Hash] Token details
|
|
121
|
+
def token_details(token_id)
|
|
122
|
+
@client.post(Constants::INFO_ENDPOINT, { type: 'tokenDetails', tokenId: token_id })
|
|
123
|
+
end
|
|
81
124
|
end
|
|
82
125
|
end
|
data/lib/hyperliquid/version.rb
CHANGED