mateodelnorte / coinbase Goto Github PK
View Code? Open in Web Editor NEWwrapper for the coinbase bitcoin wallet & exchange API
License: MIT License
wrapper for the coinbase bitcoin wallet & exchange API
License: MIT License
Congratulations guys.
The way you engineered this library, has never been before seen.
I love the work.
In trying to test both locally and on a server I ran into an issue where coinbase would return 401 unauthrorized. I pinned this down to the requirement that nonce values are strictly higher than any nonce value submitted before.
Looks like this library is using process.hrtime()
to generate the nonce. While this works Ok on a single machine it is not consistent from machine to machine.
Hi,
We have been using your library on one of our servers. We keep having to make new keys because the old one stops working.
I have tested the following change with an old key and it works again:
function setExpire(url) {
var expireTime = String(Math.floor(Date.now()/1000) + 15);
if (url.indexOf("?") > -1) {
return url + '&expire=' + expireTime;
}
return url + '?expire=' + expireTime;
}
function get (url, callback) {
url = setExpire(url);
(...)
function post (url, param, callback) {
url = setExpire(url);
Doc on expire feature:
https://developers.coinbase.com/docs/wallet/authentication
Out-of-order Processing
Sometimes network traffic can cause near-simultaneous API calls to arrive out of order. Since the nonce must always be increasing, an API call with a higher nonce may arrive earlier than a separate call with a lower nonce if they are initiated very quickly together. When this happens, the 2nd call will be dropped as invalid. To address this, a separate expire parameter can be included, specifying a unix timestamp after which the call will not process.
When the expire parameter is included, the nonce is ignored. We recommend setting the expire parameter to no greater than 15 minutes in the future to prevent replay attempts.
Example
GET https://coinbase.com/api/v1/account/balance?expire=1406139548
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/var/lib/openshift/5562dcd5500446389000024c/app-root/
runtime/repo/node_modules/coinbase/lib/model/AccountBase.js:9:19)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Is this package published on npm? From your package.json
it looks like it should map to coinbase package, but in the npm registry there is a different package with that name already (the official one). Would you mind publishing this one with a different name, so users can depend on this package by npm name instead of github remote?
Would you mind updating npm with the newest version of this module? Took me a while to figure out that the latest version in npm doesn't support sending the now-required API+Secret authentication format.
Hello,
Looking at the code it seems to me that the balance function will only return the default account, is there any way to pass an account_id as proposed in coinbase API (https://coinbase.com/api/doc/1.0/account/balance.html) ?
Cheers,
With npm coinbase 1.x coinbase has pretty much rewritten it all. @mateodelnorte Do you plan on continuing this project here? I am asking because I plan to add functionality to my fork and maybe also do some pull requests. But of course if coinbase 0.x is dicontinued I could also go and alter coinbase 1.x. I personally liked your version :)
why is the /buys endpoint requesting merchant and button permissions?
like error is: { [Error] error: 'API Key does not support merchant, buttons or all scopes' }
Hello
I just used MetaMask for the first time.
I am also on mac using chrome.
I Sent a transaction from hard wallet to Coinbase but it's days later and still has not cleared.
It was sent from my address:
0xE2c3FbfcE0D2Dc2149b095AC53f0b4357cD7AAB2
To this address:
0x21344b10b694964f624913caad97d33ddfc9f83b
Several days after my Coinbase accounts account on transfer is still empty.
when I clik on the View on the Block explorer operation I have this error:
404 - File or directory not found.
Page not found
The requested path was not found on BlockScout
How can this happen?
Please help!
Thanks,
Diana
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.