Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

295
Vistas
trying to send money with coinbase api (invalid signature)

i am trying to send money with the coinbase api using node js, the node js coinbase library is broken, so i am querying the api directly, it works fine for all endpoints with the GET method, when i try to use the POST method to send money i get an invalid signature error, i am almost sure it is because of the way i am sending the body, i have tried several ways and still nothing works, if someone could help me to figure out what i am doing wrong, it would be of great help, thank you in advance.

        let params = {
            'type': 'send',
            'to': address,
            'amount': '0.00001',
            'currency': 'BTC',
            'idem': Math.floor(Date.now() / 1000)
        }

        var timestamp = Math.floor(Date.now() / 1000);
        var message = timestamp + 'POST' + '/v2/' + `accounts/${account_id}/transactions` + JSON.stringify(params);
        var signature = crypto.createHmac('sha256', api_secret).update(message).digest('hex');

        var config = {
            method: 'POST',
            url: `https://api.coinbase.com/v2/accounts/${account_id}/transactions`, 
            params: JSON.stringify(params),
            headers: { 
              'Content-Type': 'application/json',
              'CB-ACCESS-KEY': api_key,
              'CB-ACCESS-SIGN': signature,
              'CB-ACCESS-TIMESTAMP':  Math.floor(Date.now() / 1000),
              'CB-VERSION': '2016-02-18'
            }
        };

        const response = await axios(config);
        console.log(response)
    ```
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda