apiverve_goldprice 1.2.2 → 1.2.4

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: 6f6eea6865a1026b382d8c20a2060ac4f7073bebc7fda2e255b8addf78781d09
4
- data.tar.gz: a0033078652eb4ac2507b64c9ba2112a826270295d260eabd79a1808e73fc165
3
+ metadata.gz: 8b49a58564f914583cd65c152d96d55e0bc937d76a0875b7f5dd9d50a0c5d921
4
+ data.tar.gz: 8e54293365ca490dadef0163b7b825884c51936b11e57a58f720c391f5637061
5
5
  SHA512:
6
- metadata.gz: e135f32fad886000ba43fb9e6fc6063e6843cd37a43d14b13f43c9628f02ff3c1974e911980352fc89d1c3d41dbd8910121a753e3df3d1c13ae7a65d5b25bdfa
7
- data.tar.gz: 8062d4ea3382bb9486c1a2521216b88ec942dd9f42c2b39f5b27f4e1bd42c1003956ddc6d4cab564e64abbbd00e14cf5e6ec585ed1f83d8a324fce5a3b1ab4dc
6
+ metadata.gz: 50ee96f2953782eefba281aec7d810d34223fdfcbb9d3918178b96da2a8051508e1c5095fd3909983a2954794196ae70a2c3a62e4ff32f3f9d5c09d005f6735f
7
+ data.tar.gz: '09eaed34441e5995111a3fd5e757a99b86fe5520a0612c7ce71c1d4ce0368e7a0f456c4064f9e8bb32292f7b395a6b3c97f1cbd918b0be5826d64aaeaf9b513c'
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Gold Price API - Ruby Gem
2
2
 
3
- Gold Price fetches real-time spot gold prices per troy ounce, gram, and kilogram. Each response includes the price update timestamp, 24-hour price change, and market direction, while paid plans add custom currencies and hourly history.
3
+ Gold Price fetches real-time spot gold prices per troy ounce, gram, and kilogram. Each response includes the update timestamp, 24-hour price change, and market direction, while paid plans add custom currencies, karat prices, 7- and 30-day changes, 30-day stats, and hourly and daily history.
4
4
 
5
5
  ## Installation
6
6
 
@@ -38,9 +38,7 @@ client = APIVerve::Goldprice::Client.new(api_key: "YOUR_API_KEY")
38
38
  response = client.execute({
39
39
  currency: "USD",
40
40
  hourly: true,
41
- hourly[].hour: 0,
42
- hourly[].price: 0,
43
- hourly[].timestamp: ""
41
+ daily: true
44
42
  })
45
43
 
46
44
  # Print the response
@@ -52,7 +50,7 @@ puts response
52
50
 
53
51
  ```ruby
54
52
  begin
55
- response = client.execute({ currency: "USD", hourly: true, hourly[].hour: 0, hourly[].price: 0, hourly[].timestamp: "" })
53
+ response = client.execute({ currency: "USD", hourly: true, daily: true })
56
54
  puts response["data"]
57
55
  rescue APIVerve::Goldprice::ValidationError => e
58
56
  puts "Validation error: #{e.errors.join(', ')}"
@@ -80,21 +78,160 @@ client = APIVerve::Goldprice::Client.new(
80
78
  "error": null,
81
79
  "data": {
82
80
  "currency": "USD",
83
- "gram": 138.63,
84
- "kilogram": 138633.92,
85
- "ounce": 4312,
86
- "lastUpdated": "2026-02-07T12:00:00.000Z",
87
- "change24h": 28.5,
88
- "change24hPct": 0.67,
81
+ "gram": 129.25,
82
+ "kilogram": 129251.92,
83
+ "ounce": 4020.19,
84
+ "lastUpdated": "2026-10-27T12:00:00.000Z",
85
+ "change24h": 11.88,
86
+ "change24hPct": 0.3,
89
87
  "changeDirection": "up",
90
- "high24h": 4325,
91
- "low24h": 4278.5,
88
+ "high24h": 4020.19,
89
+ "low24h": 4008.31,
90
+ "change7d": -102.49,
91
+ "change7dPct": -2.49,
92
+ "change30d": -265.95,
93
+ "change30dPct": -6.2,
94
+ "high30d": 4198.91,
95
+ "low30d": 3993.62,
96
+ "average30d": 4132.9,
97
+ "volatility30d": 0.7777,
98
+ "daily": [
99
+ {
100
+ "date": "2026-09-28",
101
+ "price": 4198.34
102
+ },
103
+ {
104
+ "date": "2026-09-29",
105
+ "price": 4129.1
106
+ },
107
+ {
108
+ "date": "2026-09-30",
109
+ "price": 4181.49
110
+ },
111
+ {
112
+ "date": "2026-10-01",
113
+ "price": 4182.57
114
+ },
115
+ {
116
+ "date": "2026-10-02",
117
+ "price": 4185.41
118
+ },
119
+ {
120
+ "date": "2026-10-03",
121
+ "price": 4137.55
122
+ },
123
+ {
124
+ "date": "2026-10-04",
125
+ "price": 4137.54
126
+ },
127
+ {
128
+ "date": "2026-10-05",
129
+ "price": 4131.88
130
+ },
131
+ {
132
+ "date": "2026-10-06",
133
+ "price": 4122.7
134
+ },
135
+ {
136
+ "date": "2026-10-07",
137
+ "price": 4132.77
138
+ },
139
+ {
140
+ "date": "2026-10-08",
141
+ "price": 4125.82
142
+ },
143
+ {
144
+ "date": "2026-10-09",
145
+ "price": 4198.91
146
+ },
147
+ {
148
+ "date": "2026-10-10",
149
+ "price": 4195.82
150
+ },
151
+ {
152
+ "date": "2026-10-11",
153
+ "price": 4195.81
154
+ },
155
+ {
156
+ "date": "2026-10-12",
157
+ "price": 4186.27
158
+ },
159
+ {
160
+ "date": "2026-10-13",
161
+ "price": 4188.41
162
+ },
163
+ {
164
+ "date": "2026-10-14",
165
+ "price": 4158.44
166
+ },
167
+ {
168
+ "date": "2026-10-15",
169
+ "price": 4144.7
170
+ },
171
+ {
172
+ "date": "2026-10-16",
173
+ "price": 4182.94
174
+ },
175
+ {
176
+ "date": "2026-10-17",
177
+ "price": 4164.68
178
+ },
179
+ {
180
+ "date": "2026-10-18",
181
+ "price": 4164.67
182
+ },
183
+ {
184
+ "date": "2026-10-19",
185
+ "price": 4180.55
186
+ },
187
+ {
188
+ "date": "2026-10-20",
189
+ "price": 4122.68
190
+ },
191
+ {
192
+ "date": "2026-10-21",
193
+ "price": 4120.33
194
+ },
195
+ {
196
+ "date": "2026-10-22",
197
+ "price": 4091.63
198
+ },
199
+ {
200
+ "date": "2026-10-23",
201
+ "price": 4010.3
202
+ },
203
+ {
204
+ "date": "2026-10-24",
205
+ "price": 3993.62
206
+ },
207
+ {
208
+ "date": "2026-10-25",
209
+ "price": 3993.62
210
+ },
211
+ {
212
+ "date": "2026-10-26",
213
+ "price": 4008.31
214
+ },
215
+ {
216
+ "date": "2026-10-27",
217
+ "price": 4020.19
218
+ }
219
+ ],
220
+ "marketStatus": "open",
221
+ "karatGram": {
222
+ "24k": 129.25,
223
+ "22k": 118.48,
224
+ "21k": 113.09,
225
+ "18k": 96.94,
226
+ "14k": 75.4,
227
+ "10k": 53.85
228
+ },
92
229
  "formatted": {
93
- "ounce": "$4,312.00",
94
- "gram": "$138.63",
95
- "kilogram": "$138,633.92",
96
- "ounceWords": "four thousand, three hundred twelve dollars",
97
- "kilogramWords": "one hundred thirty-eight thousand, six hundred thirty-four dollars"
230
+ "ounce": "$4,020.19",
231
+ "gram": "$129.25",
232
+ "kilogram": "$129,251.92",
233
+ "ounceWords": "four thousand, twenty dollars",
234
+ "kilogramWords": "one hundred twenty-nine thousand, two hundred fifty-two dollars"
98
235
  }
99
236
  }
100
237
  }
@@ -10,7 +10,7 @@ module APIVerve
10
10
  #
11
11
  # @example Basic usage
12
12
  # client = APIVerve::Goldprice::Client.new(api_key: "your_api_key")
13
- # response = client.execute({ currency: "USD", hourly: true, hourly[].hour: 0, hourly[].price: 0, hourly[].timestamp: "" })
13
+ # response = client.execute({ currency: "USD", hourly: true, daily: true })
14
14
  # puts response
15
15
  #
16
16
  # @see https://apiverve.com/marketplace/goldprice?utm_source=ruby&utm_medium=referral&utm_content=readme
@@ -19,7 +19,7 @@ module APIVerve
19
19
  DEFAULT_TIMEOUT = 30
20
20
 
21
21
  # Validation rules for parameters
22
- VALIDATION_RULES = { 'currency' => { type: 'string', required: false }, 'hourly' => { type: 'boolean', required: false }, 'hourly[].hour' => { type: 'number', required: false }, 'hourly[].price' => { type: 'number', required: false }, 'hourly[].timestamp' => { type: 'string', required: false } }
22
+ VALIDATION_RULES = { 'currency' => { type: 'string', required: false }, 'hourly' => { type: 'boolean', required: false }, 'daily' => { type: 'boolean', required: false } }
23
23
 
24
24
  # Format validation patterns
25
25
  FORMAT_PATTERNS = {
@@ -4,6 +4,6 @@ require_relative "apiverve_goldprice/client"
4
4
 
5
5
  module APIVerve
6
6
  module Goldprice
7
- VERSION = "1.2.2"
7
+ VERSION = "1.2.4"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiverve_goldprice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIVerve
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-10-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: faraday
@@ -59,8 +58,9 @@ dependencies:
59
58
  - !ruby/object:Gem::Version
60
59
  version: '2.0'
61
60
  description: Gold Price fetches real-time spot gold prices per troy ounce, gram, and
62
- kilogram. Each response includes the price update timestamp, 24-hour price change,
63
- and market direction, while paid plans add custom currencies and hourly history.
61
+ kilogram. Each response includes the update timestamp, 24-hour price change, and
62
+ market direction, while paid plans add custom currencies, karat prices, 7- and 30-day
63
+ changes, 30-day stats, and hourly and daily history.
64
64
  email:
65
65
  - hello@apiverve.com
66
66
  executables: []
@@ -79,7 +79,6 @@ metadata:
79
79
  source_code_uri: https://github.com/apiverve/goldprice-API/tree/main/ruby
80
80
  changelog_uri: https://apiverve.com/changelog
81
81
  documentation_uri: https://docs.apiverve.com/ref/goldprice
82
- post_install_message:
83
82
  rdoc_options: []
84
83
  require_paths:
85
84
  - lib
@@ -94,8 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
93
  - !ruby/object:Gem::Version
95
94
  version: '0'
96
95
  requirements: []
97
- rubygems_version: 3.0.3.1
98
- signing_key:
96
+ rubygems_version: 4.0.23
99
97
  specification_version: 4
100
98
  summary: Gold Price API - Ruby Client
101
99
  test_files: []