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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce12eae948710ac0527586206ef346535631855e2e99e5d858bbcbfab0440826
4
- data.tar.gz: 58cfa00339c797844b38a1744392a4589c97a9d7c61b3d6782411a1f4a2adc05
3
+ metadata.gz: 6e872be045b5d2e21d4e2da9faf5ed12ef61f5d8310eeb3bb3c87afd07c43717
4
+ data.tar.gz: f334156a2da8a6abb437872af50b28cab0e5422174e310f867dc410852c2b24b
5
5
  SHA512:
6
- metadata.gz: 146b89a2874c1410b470cf2e9c795af60915dc4b5b9aaaad40228823230e8c738292a7c480e873f5732a896cdd4aa502622c8df47fa21321b51894efd5948a16
7
- data.tar.gz: 870019afb083c7a5864361335fc5294d941d47e4318f38f5acd548ee63bfde3f364928f8f71690bca76db5aa68255478bc205a91c79f5737bdbdb78ce77f073e
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
- This is v0.1.0 - an alpha-stage read-only implementation focusing on the Info API endpoints for market data, user information, and order book data.
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
- This is v0.1.0 with read-only Info API support. Future versions will include:
211
+ The latest version is v0.2.0 with read-only Info API support. Future versions will include:
212
212
 
213
- - v0.2.0: Trading API (place orders, cancel orders, etc.)
214
- - v0.3.0: WebSocket support for real-time data
215
- - v0.4.0: Advanced trading features
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
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hyperliquid
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperliquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - carter2099