mjesuele / gemini-api-node Goto Github PK
View Code? Open in Web Editor NEWNode.js client for the Gemini cryptocurrency exchange API
Node.js client for the Gemini cryptocurrency exchange API
I appreciate the wrapper. I will give it a go once I can get it working.
FYI the 'import' isn't standardized yet so Babel is required for set up from what I can see.
Seeing as I am new to babel getting this api up and running is very difficult as the babel documentation and community are littered with old/unusable advice.
I just thought it was worth mentioning as I am assuming other people ran into the same problem and gave up.
I am trying to do a naive update based on the ReadMe, but I am having trouble moving it to consume updates from the initial open.
My code via a es6 module:
let ops = {
key:'',
secret:'',
sandbox: true
};
self.__geminiWebSocket = new GeminiAPI.WebsocketClient(ops);
self.__geminiWebSocket.openMarketSocket(symbol, () =>
console.log('opened');
this.__geminiWebSocket.addMarketMessageListener((data) => {
console.log(data); // works
});
// doesn't work :(
self.__geminiWebSocket.addMarketListener('trade', (data) =>{
var count =0;
console.log('more stuff');
console.log(data);
console.log(count++);
});
Thank you!
I guess the package relies on the Node standard library which neither expo nor react-native include. Is there any way around this?
I'm new to the node world in general so any help would be appreciated.
When I import gemini-api like in the example:
import GeminiAPI from 'gemini-api';
packages/modules.js:377
W20170615-16:46:00.105(7)? (STDERR) constructor({ key, secret, sandbox = false } = { sandbox: false }) {
W20170615-16:46:00.106(7)? (STDERR) ^
W20170615-16:46:00.106(7)? (STDERR)
W20170615-16:46:00.107(7)? (STDERR) SyntaxError: Unexpected token {
.... Is there a way to fix this?
when i call getMyPastTrades to get all my past trades. I am expecting the returned timestamp to be the time the trade taken. However, it is returning the time when i am calling the method.
The API works great for my when running the js file directly in the console. However, when attempting to run via any browser, the private APIs are blocked by what appears to be a CORS issue. Any thoughts on bypassing this error in the browser?
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.