Giter VIP home page Giter VIP logo

Comments (15)

emmtte avatar emmtte commented on May 28, 2024

updated, please try

from list.

Popcorn2018 avatar Popcorn2018 commented on May 28, 2024

No joy, sorry.

SyntaxError: Unexpected token: P (line 31, file "Stamp")

When I Logger.log(response); the log says "POST Only Endpoint"

When I Logger.log(options) the log says: "method=post, payload=key=MY API KEY&signature=94,113,68,-68,28,72,-1,-3,41,33,-2,58,-102,-113,-95,-71,47,25,-55,-34,95,-33,-125,28,22,-91,-61,89,103,20,-62,102&nonce=13 digit number here

I have changed some of the numbers in the signature.

When I tried to hire a guy on Fiverr to do this for me he said that "bitstamp and cryptopia use another kind of algorithm with is not supported on google scripts for now" so maybe this script needs to look more like the cryptopia one?

from list.

emmtte avatar emmtte commented on May 28, 2024

Not good for signature it' should be HEX number.
I need to open an account and doing more test before post code

from list.

emmtte avatar emmtte commented on May 28, 2024

Finally found (I hope because not yet an account)
Please try again (V0.3)
Thanks for your support

from list.

Popcorn2018 avatar Popcorn2018 commented on May 28, 2024

Still the same, sorry:

Options logs as: {method=post, payload=key=API KEY &signature=20FA4834E564A56CCBC6E3A94D7D6391D123BAE25984378581D76172AF587F03&nonce=1516496033795, muteHttpExceptions=true}
Response logs as: POST Only Endpoint

And the script gives the error: SyntaxError: Unexpected token: P

from list.

Popcorn2018 avatar Popcorn2018 commented on May 28, 2024

Hi, have you had a chance to look at this? I can provide you with API details if you need some to test with.

from list.

emmtte avatar emmtte commented on May 28, 2024

Hi, no way at this moment.
found this : https://github.com/blacksun1/google-scripts-bitstamp-api
need to work on it

from list.

emmtte avatar emmtte commented on May 28, 2024

updated, just changed var url = "http://www.bitstamp.net/api/v2/balance/" by var url = "http://www.bitstamp.net/api/balance/"
please try again

from list.

Popcorn2018 avatar Popcorn2018 commented on May 28, 2024

No joy.
Options logs as:
{method=post, payload=key=MYAPIKEYHERE&signature=51D0F5FDAF1234567898765432142233949A680CFF0C73C19414EEF&nonce=1518207217, muteHttpExceptions=true}

Response logs as: {"error": "Missing key, signature and nonce parameters"}

I'll have a look at that other script and maybe see if I can pay someone on fiverr to crack this one for us.

from list.

Popcorn2018 avatar Popcorn2018 commented on May 28, 2024

That script requires crypto-js's hmac 256 api, but the link provided on that git doesn't work anymore so I'm not sure where to get that from. Would be good if it worked with the same jsSHA that you're using but this line throws an error:

return CryptoJS.HmacSHA256(message, this.secret).toString().toUpperCase();

from list.

emmtte avatar emmtte commented on May 28, 2024

I think we are really near a solution, the problem come from the end of the code

var url = "http://www.bitstamp.net/api/balance/"
cb = "key=" + key + "&signature=" + signature + "&nonce=" + nonce;

//var options = { method: 'post' };

var options = {
  "method" : "post",
  "payload": cb,
  "muteHttpExceptions" : true
 };

var response = UrlFetchApp.fetch (url, options);
var data = JSON.parse(response.getContentText());   

from list.

emmtte avatar emmtte commented on May 28, 2024

updated try again

from list.

Popcorn2018 avatar Popcorn2018 commented on May 28, 2024

No sorry... The new code still gives "POST Only Endpoint"

Swapping the url to http://www.bitstamp.net/api/balance/ gives {"error": "Missing key, signature and nonce parameters"}

Sorry!

from list.

jelbazi avatar jelbazi commented on May 28, 2024

I fixed the issue @Popcorn2018 & @ManuCart (see link).

Also added conversion to correct input format for main.js.

from list.

emmtte avatar emmtte commented on May 28, 2024

Well done!
Merged
Hope found the solution.
Thanks @jelbazi

from list.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.