@fileverse-dev/formulajs 4.4.53 → 4.4.54
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.
package/lib/cjs/index.cjs
CHANGED
|
@@ -18400,7 +18400,9 @@ async function COINGECKO() {
|
|
|
18400
18400
|
switch (category?.toLowerCase?.()) {
|
|
18401
18401
|
case 'price': {
|
|
18402
18402
|
const vs = param2 || 'usd';
|
|
18403
|
-
|
|
18403
|
+
// CoinGecko /simple/price?symbols= currently returns {} on public/demo APIs.
|
|
18404
|
+
// Use coin ids instead (e.g. bitcoin, ethereum).
|
|
18405
|
+
url = `https://api.coingecko.com/api/v3/simple/price?vs_currencies=${vs}&ids=${param1}`;
|
|
18404
18406
|
break
|
|
18405
18407
|
}
|
|
18406
18408
|
case 'market': {
|
|
@@ -323,22 +323,23 @@ var COINGECKO_metadata = {
|
|
|
323
323
|
{
|
|
324
324
|
name: "category",
|
|
325
325
|
detail: 'Query type: "price", "market", "stablecoins", or "derivatives".',
|
|
326
|
-
example: `"
|
|
326
|
+
example: `"price"`,
|
|
327
327
|
require: "m"
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
330
|
name: "param1",
|
|
331
|
-
detail: `If "price" then - eg. "
|
|
331
|
+
detail: `If "price" then - CoinGecko coin ids, eg. "bitcoin", "ethereum", "bitcoin,ethereum" (not ticker symbols like "btc").
|
|
332
332
|
If "market": one of "all", "base", "meme", "aiagents", "bitcoin", "ethereum", "hyperliquid", "pump", "solana".
|
|
333
333
|
If "stablecoins": one of "all", "yield-bearing-stablecoins", "crypto-backed-stablecoin".
|
|
334
334
|
If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-futures", "bybit" ).`,
|
|
335
|
-
example: `"
|
|
335
|
+
example: `"bitcoin"`,
|
|
336
336
|
require: "m"
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
name: "param2",
|
|
340
|
-
detail: `If "
|
|
341
|
-
|
|
340
|
+
detail: `If "price" then vs currency (default "usd"), eg. "usd", "eur".
|
|
341
|
+
If "market" and "stablecoins" then eg. "1h", "24h", "7d", "14d", "30d", "200d", "1y".`,
|
|
342
|
+
example: `"usd"`,
|
|
342
343
|
require: "o"
|
|
343
344
|
},
|
|
344
345
|
{
|
|
@@ -350,6 +351,16 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
350
351
|
}
|
|
351
352
|
],
|
|
352
353
|
examples: [
|
|
354
|
+
{
|
|
355
|
+
title: "COINGECKO",
|
|
356
|
+
argumentString: '"price", "bitcoin"',
|
|
357
|
+
description: "returns the current Bitcoin price in USD (e.g. BITCOIN_USD)."
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
title: "COINGECKO",
|
|
361
|
+
argumentString: '"price", "bitcoin,ethereum", "usd"',
|
|
362
|
+
description: "returns current Bitcoin and Ethereum prices in USD."
|
|
363
|
+
},
|
|
353
364
|
{
|
|
354
365
|
title: "COINGECKO",
|
|
355
366
|
argumentString: '"stablecoins", "yield-bearing-stablecoins", "1h,24h,7d"',
|
package/lib/esm/index.mjs
CHANGED
|
@@ -18398,7 +18398,9 @@ async function COINGECKO() {
|
|
|
18398
18398
|
switch (category?.toLowerCase?.()) {
|
|
18399
18399
|
case 'price': {
|
|
18400
18400
|
const vs = param2 || 'usd';
|
|
18401
|
-
|
|
18401
|
+
// CoinGecko /simple/price?symbols= currently returns {} on public/demo APIs.
|
|
18402
|
+
// Use coin ids instead (e.g. bitcoin, ethereum).
|
|
18403
|
+
url = `https://api.coingecko.com/api/v3/simple/price?vs_currencies=${vs}&ids=${param1}`;
|
|
18402
18404
|
break
|
|
18403
18405
|
}
|
|
18404
18406
|
case 'market': {
|