Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!