npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

paydece-sdk-test

v1.0.0

Published

SDK para integrar con la API simplificada de PayDece

Readme

PayDece SDK

SDK para integrar con la API simplificada de PayDece. Este SDK proporciona una interfaz fácil de usar para interactuar con los servicios de PayDece, incluyendo la obtención de órdenes de compra y venta de criptomonedas, verificación de API keys y listados de criptomonedas y monedas fiat disponibles.

Instalación

npm install paydece-sdk

Uso

import { PayDeceSDK } from 'paydece-sdk';

// Inicializar el SDK
const sdk = new PayDeceSDK({
  baseUrl: 'https://v0-dashboard-cueva.vercel.app/',
  apiKey: 'tu-api-key'
});

// Obtener órdenes de compra y venta
const orders = await sdk.getOrders({
  type: 'both',
  fiatCoin: 1,    // ARS (Peso Argentino)
  crypto: 7,      // BTC (Bitcoin)
  blockchain: 56  // BNB Chain
});

if (orders.success) {
  console.log(`Mejor precio de compra: ${orders.buyPrice} ${orders.buyFiat.symbol}`);
  console.log(`Mejor precio de venta: ${orders.sellPrice} ${orders.sellFiat.symbol}`);
  console.log(`Spread: ${orders.spread}%`);
  console.log(`Cantidad disponible para compra: ${orders.buyAmount} ${orders.buyCrypto.symbol}`);
  console.log(`Cantidad disponible para venta: ${orders.sellAmount} ${orders.sellCrypto.symbol}`);
  console.log(`Blockchain: ${orders.buyCrypto.blockchain?.description}`);
  console.log(`Link para comprar: ${orders.buyLink}`);
  console.log(`Link para vender: ${orders.sellLink}`);
  
  // Información del vendedor
  console.log(`Vendedor: ${orders.buySeller.username}`);
  console.log(`Calificación positiva: ${orders.buySeller.positiveRating}%`);
  console.log(`Transacciones totales: ${orders.buySeller.totalTransactions}`);
  
  // Métodos de pago aceptados
  console.log('Métodos de pago aceptados:');
  orders.buyPaymentMethods.forEach(method => console.log(`- ${method}`));
}

// Verificar API key
const verification = await sdk.verifyApiKey({
  apiKey: 'tu-api-key'
});

if (verification.success) {
  console.log('API key válida');
  console.log('Propietario:', verification.owner);
  console.log('Permisos:', verification.permissions.join(', '));
  console.log('Creada:', new Date(verification.createdAt).toLocaleDateString());
  console.log('Expira:', verification.expiresAt ? new Date(verification.expiresAt).toLocaleDateString() : 'No expira');
}

// Obtener lista de criptomonedas
const cryptoList = await sdk.getCryptoList();
if (cryptoList.success) {
  console.log('Criptomonedas disponibles:');
  cryptoList.data.forEach(crypto => {
    console.log(`ID: ${crypto.cryptoGroupId}, Símbolo: ${crypto.symbol}, Nombre: ${crypto.description}`);
  });
}

// Obtener lista de monedas fiat
const fiatList = await sdk.getFiatList();
if (fiatList.success) {
  console.log('Monedas fiat disponibles:');
  fiatList.data.forEach(fiat => {
    console.log(`ID: ${fiat.fiatCoinId}, Símbolo: ${fiat.symbol}, Nombre: ${fiat.description}`);
  });
}

API

PayDeceSDK

Constructor

new PayDeceSDK(config: SDKConfig)

Parámetros:

  • config.baseUrl: URL base de la API de PayDece
  • config.apiKey: Tu API key de PayDece

Métodos

getOrders(params: OrdersParams): Promise

Obtiene las mejores ofertas de compra y venta de criptomonedas.

Parámetros:

  • params.type: (opcional) Tipo de órdenes ('buy', 'sell' o 'both')
  • params.fiatCoin: ID de la moneda fiat (1: ARS, 2: USD, 3: COP, 5: MXN, 6: BRL, 7: VES, 12: BOB, 13: EUR, 15: UYU, 19: CUSTOM)
  • params.crypto: ID del grupo de criptomonedas (7: BTC, 1: ETH, 2: USDT, etc.)
  • params.blockchain: (opcional) ID de la blockchain (56: BNB Chain, 137: Polygon, 8453: Base, 43114: Avalanche)
verifyApiKey(params: VerifyApiKeyParams): Promise

Verifica si una API key es válida.

Parámetros:

  • params.apiKey: API key a verificar
getCryptoList(): Promise

Obtiene la lista de criptomonedas disponibles.

getFiatList(): Promise

Obtiene la lista de monedas fiat disponibles.

Desarrollo

  1. Clonar el repositorio:

    git clone https://github.com/paydece/paydece-sdk.git
    cd paydece-sdk
  2. Instalar dependencias:

    npm install
  3. Compilar el proyecto:

    npm run build
  4. Ejecutar pruebas:

    npm test

Licencia

MIT